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] [day] [month] [year] [list]
Message-ID: <98f9d4af7fd245358d49081fd3632bf9@realtek.com>
Date: Mon, 22 Dec 2025 01:54:12 +0000
From: Shuming [θŒƒζ›ΈιŠ˜] <shumingf@...ltek.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
CC: Oder Chiou <oder_chiou@...ltek.com>, Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
        "Takashi
 Iwai" <tiwai@...e.com>,
        "linux-sound@...r.kernel.org"
	<linux-sound@...r.kernel.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org"
	<kernel-janitors@...r.kernel.org>
Subject: RE: [PATCH next] ASoC: rt1320: Fix retry checking in
 rt1320_rae_load()

> This loop iterates 200 times and then gives up.  The problem is that currently
> the loop exits with "retry" set to -1 on the failure path but the check for failure
> expects it to be 0.  Change from a post-op to a pre-op so that it exits with
> "retry" set to 0.
> 
> Fixes: 22937af75abb ("ASoC: rt1320: support RAE parameters loading")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
> Technically now the loop only tries 199 times after my change, however I am
> okay with that.
> 
>  sound/soc/codecs/rt1320-sdw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c
> index 9447e742c672..c0acb6ac462d 100644
> --- a/sound/soc/codecs/rt1320-sdw.c
> +++ b/sound/soc/codecs/rt1320-sdw.c
> @@ -1480,7 +1480,7 @@ static int rt1320_rae_load(struct rt1320_sdw_priv
> *rt1320)
>                 /* RAE stop & CRC disable */
>                 regmap_update_bits(rt1320->regmap, 0xe803, 0xbc,
> 0x00);
> 
> -               while (retry--) {
> +               while (--retry) {
>                         regmap_read(rt1320->regmap, 0xe83f, &value);
>                         if (value & 0x40)
>                                 break;
> --

Acked-by: Shuming Fan <shumingf@...ltek.com>

Thanks for this patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ