Re: [PATCH] ASoC: simple-card-utils: fixup simple_util_startup() error handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2023-09-14 at 23:12 +0000, Kuninori Morimoto wrote:
> It should use "goto" instead of "return"
> 
> Fixes: 5ca2ab459817 ("ASoC: simple-card-utils: Add new system-clock-
> fixed flag")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Closes:
> https://urldefense.com/v3/__https://lore.kernel.org/all/202309141205.ITZeDJxV-lkp@xxxxxxxxx/__;!!IOGos0k!hssN0kOFOVhyXOWDlpCW-oJtMbLmf9Nshra5RawcV2Gi8ep_GU46gneFf2Ftl8h8cKKE1CrTHt1i3HVu5o9NE-wAAN3bShQ$
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> ---
> I have mentioned that different point when reply,
> but Dan's report was correct.
> 
>  sound/soc/generic/simple-card-utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/generic/simple-card-utils.c
> b/sound/soc/generic/simple-card-utils.c
> index 36ce3a4343f9..348fe6f8a537 100644
> --- a/sound/soc/generic/simple-card-utils.c
> +++ b/sound/soc/generic/simple-card-utils.c
> @@ -310,7 +310,7 @@ int simple_util_startup(struct snd_pcm_substream
> *substream)
>                 if (fixed_sysclk % props->mclk_fs) {
>                         dev_err(rtd->dev, "fixed sysclk %u not
> divisible by mclk_fs %u\n",
>                                 fixed_sysclk, props->mclk_fs);
> -                       return -EINVAL;
> +                       goto codec_err;
>                 }
>                 ret = snd_pcm_hw_constraint_minmax(substream-
> >runtime, SNDRV_PCM_HW_PARAM_RATE,
>                         fixed_rate, fixed_rate);
> --
> 2.25.1
> 

Reviewed-by: Robert Hancock <robert.hancock@xxxxxxxxxx>

-- 
Robert Hancock <robert.hancock@xxxxxxxxxx>




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux