Skip to content

Commit 69cf63b

Browse files
morimotobroonie
authored andcommitted
ASoC: simple-card-utils: fixup simple_util_startup() error handling
It should use "goto" instead of "return" Fixes: 5ca2ab4 ("ASoC: simple-card-utils: Add new system-clock-fixed flag") Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Closes: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent fb0b8d2 commit 69cf63b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sound/soc/generic/simple-card-utils.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ int asoc_simple_startup(struct snd_pcm_substream *substream)
310310
if (fixed_sysclk % props->mclk_fs) {
311311
dev_err(rtd->dev, "fixed sysclk %u not divisible by mclk_fs %u\n",
312312
fixed_sysclk, props->mclk_fs);
313-
return -EINVAL;
313+
ret = -EINVAL;
314+
goto codec_err;
314315
}
315316
ret = snd_pcm_hw_constraint_minmax(substream->runtime, SNDRV_PCM_HW_PARAM_RATE,
316317
fixed_rate, fixed_rate);

0 commit comments

Comments
 (0)