[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87fshavgut.wl-kuninori.morimoto.gx@renesas.com>
Date: Fri, 02 Sep 2022 08:02:02 +0900
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: Jiasheng Jiang <jiasheng@...as.ac.cn>
Cc: lgirdwood@...il.com, broonie@...nel.org, perex@...ex.cz,
tiwai@...e.com, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: rsnd: Add check for rsnd_mod_power_on
Hi
> As rsnd_mod_power_on() can return negative numbers,
> it should be better to check the return value and
> deal with the exception.
>
> Fixes: e7d850dd10f4 ("ASoC: rsnd: use mod base common method on SSI-parent")
> Signed-off-by: Jiasheng Jiang <jiasheng@...as.ac.cn>
> ---
(snip)
> --- a/sound/soc/sh/rcar/ssi.c
> +++ b/sound/soc/sh/rcar/ssi.c
> @@ -480,7 +480,9 @@ static int rsnd_ssi_init(struct rsnd_mod *mod,
>
> ssi->usrcnt++;
>
> - rsnd_mod_power_on(mod);
> + ret = rsnd_mod_power_on(mod);
> + if (ret < 0)
> + return ret;
This looks good to me, but, the code which is using rsnd_mod_power_on()
and not checking the return value is not only ssi.c.
> grep rsnd_mod_power_on ./sound/soc/sh/rcar/*.c [~/Mail/tmp]
sound/soc/sh/rcar/ctu.c: rsnd_mod_power_on(mod);
sound/soc/sh/rcar/dvc.c: rsnd_mod_power_on(mod);
sound/soc/sh/rcar/mix.c: rsnd_mod_power_on(mod);
sound/soc/sh/rcar/src.c: rsnd_mod_power_on(mod);
sound/soc/sh/rcar/ssi.c: rsnd_mod_power_on(mod);
Thank you for your help !!
Best regards
---
Kuninori Morimoto
Powered by blists - more mailing lists