mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
ASoC: samsung: s3c24xx_simtec: add missing error check
cppcheck warning: sound/soc/samsung/s3c24xx_simtec.c:191:7: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] ret = snd_soc_dai_set_clkdiv(cpu_dai, S3C24XX_DIV_PRESCALER, ^ Looking at the code, it's not clear why the return value is checked in the two other cases but not here, so mirror the behavior and add a check. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20210219230918.5058-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
5a81abc2ea
commit
0587e83c5d
1 changed files with 5 additions and 0 deletions
|
@ -190,6 +190,11 @@ static int simtec_hw_params(struct snd_pcm_substream *substream,
|
|||
|
||||
ret = snd_soc_dai_set_clkdiv(cpu_dai, S3C24XX_DIV_PRESCALER,
|
||||
cdclk_scale);
|
||||
if (ret) {
|
||||
pr_err("%s: failed to set clock div\n",
|
||||
__func__);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue