mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Vitaliy Shevtsov <v.shevtsov@maxima.ru>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>, "Seven Lee" <wtli@nuvoton.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	lvc-project@linuxtesting.org
Subject: Re: [PATCH] ASoC: nau8821: check regmap_raw_read/regmap_raw_write for failure
Date: Fri, 18 Oct 2024 14:36:57 +0300	[thread overview]
Message-ID: <CAHp75VfOoGDYHhNb2PoMOhn1SEnMMF1EXvb2ignWFenEa93Otw@mail.gmail.com> (raw)
In-Reply-To: <20241018110743.18786-1-v.shevtsov@maxima.ru>

On Fri, Oct 18, 2024 at 2:07 PM Vitaliy Shevtsov <v.shevtsov@maxima.ru> 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?

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2024-10-18 11:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 11:07 Vitaliy Shevtsov
2024-10-18 11:36 ` Andy Shevchenko [this message]
2024-10-18 20:01 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHp75VfOoGDYHhNb2PoMOhn1SEnMMF1EXvb2ignWFenEa93Otw@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=v.shevtsov@maxima.ru \
    --cc=wtli@nuvoton.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®