lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5a2872d4-7eb3-465a-aace-c848919b1f2a@opensource.cirrus.com>
Date: Mon, 5 Feb 2024 14:01:03 +0000
From: Richard Fitzgerald <rf@...nsource.cirrus.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
CC: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
        <alsa-devel@...a-project.org>, <patches@...nsource.cirrus.com>,
        <linux-sound@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH] ASoC: cs35l56: fix reversed if statement in
 cs35l56_dspwait_asp1tx_put()

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@...aro.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@...nsource.cirrus.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ