From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>, <alsa-devel@alsa-project.org>,
<patches@opensource.cirrus.com>, <linux-sound@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] ASoC: cs35l56: fix reversed if statement in cs35l56_dspwait_asp1tx_put()
Date: Mon, 5 Feb 2024 14:01:03 +0000 [thread overview]
Message-ID: <5a2872d4-7eb3-465a-aace-c848919b1f2a@opensource.cirrus.com> (raw)
In-Reply-To: <0c254c07-d1c0-4a5c-a22b-7e135cab032c@moroto.mountain>
On 05/02/2024 12:44, Dan Carpenter wrote:
> It looks like the "!" character was added accidentally. The
> regmap_update_bits_check() function is normally going to succeed. This
> means the rest of the function is unreachable and we don't handle the
> situation where "changed" is true correctly.
>
> Fixes: 07f7d6e7a124 ("ASoC: cs35l56: Fix for initializing ASP1 mixer registers")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>>From static analysis and review, not tested.
> ---
> sound/soc/codecs/cs35l56.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
> index c23e29da4cfb..ebed5ab1245b 100644
> --- a/sound/soc/codecs/cs35l56.c
> +++ b/sound/soc/codecs/cs35l56.c
> @@ -115,7 +115,7 @@ static int cs35l56_dspwait_asp1tx_put(struct snd_kcontrol *kcontrol,
>
> ret = regmap_update_bits_check(cs35l56->base.regmap, addr,
> CS35L56_ASP_TXn_SRC_MASK, val, &changed);
> - if (!ret)
> + if (ret)
> return ret;
>
> if (changed)
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
next prev parent reply other threads:[~2024-02-05 14:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 12:44 Dan Carpenter
2024-02-05 14:01 ` Richard Fitzgerald [this message]
2024-02-05 16:58 ` 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=5a2872d4-7eb3-465a-aace-c848919b1f2a@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.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®