From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A98542F46; Fri, 18 Oct 2024 11:37:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729251458; cv=none; b=ivfXduaS/JkwVPOMhsq+oNtSx64oKVpI0hO2IvZAEcKnbUIBsuAIwbEHONvoIXEp3ymUpVkh45zhvRxB4CMHB0vJasH7EJshtvImGjMr2ZgQOgj/Rks41E6ViakeWOy+OujvgROO7gKHBRAp3QMlFvCUzO7CHq9v8ZSbDJrcwrk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729251458; c=relaxed/simple; bh=Z2ZsHBlv4F58yv72hrFjXHVDQlat+cHzX5o3VrnM12I=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=bVtr3deTP4pow4/ZrJu4s/tm/cbt82+UCHwQ5s4SnwbEg9uRvwL9dEZRyDetp0Wf18ClxrgU75uqv/fmq1t9gd/BEjW8iXXEj/6TXOw4hV/0sChNhhpcYdbsQRDamjwFunoVH12J82huZ0KcHGYzY9QUxEPRY30o6RjNgIckvf8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Qyfk0RZ+; arc=none smtp.client-ip=209.85.167.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Qyfk0RZ+" Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-539f58c68c5so3270150e87.3; Fri, 18 Oct 2024 04:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729251455; x=1729856255; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Z2ZsHBlv4F58yv72hrFjXHVDQlat+cHzX5o3VrnM12I=; b=Qyfk0RZ+zrV0txLTse0GHwHlzN0TmI2lIObVDvkFeW05jKgDQUlXqfHaht65yXf05k j9KdnkH3Zx/MpvZC0guCARG3XQfYJ1l4FTv8E0OJRFMhG3ft/y+LuSEo+lmsPm1leKO5 66R19luMMpBm4KnjeeUJl5OL1ng3dKrLBVQd+yKimhw4LvthBpxPx1agqYgbpY1YHxjh raJ9xoLjJgfWMLoNgcrBpNeoP+C5h1HwvseWyzcDsN6Wg+tVbitASQspQa7NIfp+0SM4 F2O2dURVSW47pwPjQ6q5gb8p9xeCKBWmvkjOC/iCbknkkKJ41Mh09caHHGQpHoH5JnwU BOLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729251455; x=1729856255; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z2ZsHBlv4F58yv72hrFjXHVDQlat+cHzX5o3VrnM12I=; b=BsOcCZhshrI+KnYbpidTb5mPhYfv37578Bf4MkK/A11dOXWB1gygF9tkGAyzEKhZ/K dfXqll6gup0gNiRo5nX3un5JMK3+k+xfgPynG+069UuI4PRknDETx+6vqB4rffloF0eV 4znXzkS9598EndSzmVboGXMWAU7jR01e92IQ5bNuSqP3G0NEX9Br3b9cvSlzaRzKYsH4 JsiwjQDrkjntL1rGsusYNziux5Ja374Y9AkK77cMs9urIT11VOv0qWZQjI5PpBvTIXO4 TH1PXN+rtmoH9wsNDnYTSfOZt5CdoyCIZoxI+ipS6o6af/C3VxmUtgWNeMi2IFjOSF2N AUVg== X-Forwarded-Encrypted: i=1; AJvYcCUueVAQWrYLeXXliEBtze3/NiTgwMVKLu1CGDlIoj2/3/JwxWSLZJBS42+35w379HkwaGV7iGl4kayc8DU=@vger.kernel.org, AJvYcCVG+h8mAMogIMmt2DPsHLGgV7hg1XS0GPkFFOnJZmYMxSFuMeF/btn9UAc3hKSqgiV7P3ka05v4Fheoyps=@vger.kernel.org X-Gm-Message-State: AOJu0YxUw3iM8ulrQf0rb0tFsasO6S67R90oDeKwKIb9Y+erv8O9daGZ hmJjBu7sZWIJUmG1pEGFN/D3otgtSaWXXo+3OfRAWtwWlO2gl3QSfcSbpo/DtjQfRyWSXZpnTM5 fDdrZQlYQSyCjAnhYEiZYJEPoW+o= X-Google-Smtp-Source: AGHT+IFQAHfNnXc94cDnwolpYvSoq/a6eutp2/Sq+eDgHigng1jmEqrf3HNkTivuT3VBIoOWT8lNwvhzpBD8kgYACac= X-Received: by 2002:a05:6512:2315:b0:533:4620:ebec with SMTP id 2adb3069b0e04-53a153408b3mr2468738e87.3.1729251454532; Fri, 18 Oct 2024 04:37:34 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20241018110743.18786-1-v.shevtsov@maxima.ru> In-Reply-To: <20241018110743.18786-1-v.shevtsov@maxima.ru> From: Andy Shevchenko Date: Fri, 18 Oct 2024 14:36:57 +0300 Message-ID: Subject: Re: [PATCH] ASoC: nau8821: check regmap_raw_read/regmap_raw_write for failure To: Vitaliy Shevtsov Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Seven Lee , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Oct 18, 2024 at 2:07=E2=80=AFPM Vitaliy Shevtsov wrote: > > The return values from both regmap_raw_read() and regmap_raw_write() are = not > checked despite they can fail. Propagate possible errors to caller. "...them failing." "...to the caller." > Found by Linux Verification Center (linuxtesting.org) with Svace. > Fixes: aab1ad11d69f ("ASoC: nau8821: new driver") Are you sure? While the code wise the patch is correct, the behaviour changes may be catastrophic in some corner cases. The first one is the read where we try to get the data from the register, that one may be okay, but the write should be first put into the group of mandatory or optional IO. If it's the second, why bother with the IO failure? --=20 With Best Regards, Andy Shevchenko