diff options
author | Kuninori Morimoto <[email protected]> | 2023-09-19 01:22:57 +0000 |
---|---|---|
committer | Mark Brown <[email protected]> | 2023-09-19 13:48:37 +0100 |
commit | 69cf63b6560205a390a736b88d112374655adb28 (patch) | |
tree | c83b20b7885201335f7a48ae6c83aa1e7fc01f40 | |
parent | fb0b8d299781be8d46b3612aa96cef28da0d93f4 (diff) |
ASoC: simple-card-utils: fixup simple_util_startup() error handling
It should use "goto" instead of "return"
Fixes: 5ca2ab459817 ("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]>
-rw-r--r-- | sound/soc/generic/simple-card-utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 5b18a4af022f..2588ec735dbd 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -310,7 +310,8 @@ int asoc_simple_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; + ret = -EINVAL; + goto codec_err; } ret = snd_pcm_hw_constraint_minmax(substream->runtime, SNDRV_PCM_HW_PARAM_RATE, fixed_rate, fixed_rate); |