Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: sma1307: Fix invalid logical judgement

In the function sma1307_dai_hw_params_amp, the variable
'ret' has not been assigned a value, so the logical judgement
is invalid, thus fix it.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://patch.msgid.link/20241108011617.2284-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Tang Bin and committed by
Mark Brown
08aa540a f3c88974

-3
-3
sound/soc/codecs/sma1307.c
··· 1191 1191 struct snd_soc_component *component = dai->component; 1192 1192 struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component); 1193 1193 unsigned int bclk = 0; 1194 - int ret = 0; 1195 1194 1196 1195 if (sma1307->format == SND_SOC_DAIFMT_DSP_A) 1197 1196 bclk = params_rate(params) * sma1307->frame_size; ··· 1335 1336 params_format(params)); 1336 1337 return -EINVAL; 1337 1338 } 1338 - if (ret < 0) 1339 - return -EINVAL; 1340 1339 1341 1340 return 0; 1342 1341 }