]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ASoC: ak4458: Remove useless return variable
authorChen Ni <nichen@iscas.ac.cn>
Wed, 16 Apr 2025 04:10:23 +0000 (12:10 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 16 Apr 2025 12:27:02 +0000 (13:27 +0100)
Remove unnecessary return variable and compress the return logic.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250416041023.546311-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/ak4458.c

index 5f3a68dfe7bd48d461356cc4d2504af46bac4e40..57cf601d3df3544fa1cdcd33dd8d17ef06ead288 100644 (file)
@@ -586,13 +586,9 @@ static const struct snd_pcm_hw_constraint_list ak4458_rate_constraints = {
 static int ak4458_startup(struct snd_pcm_substream *substream,
                          struct snd_soc_dai *dai)
 {
-       int ret;
-
-       ret = snd_pcm_hw_constraint_list(substream->runtime, 0,
-                                        SNDRV_PCM_HW_PARAM_RATE,
-                                        &ak4458_rate_constraints);
-
-       return ret;
+       return snd_pcm_hw_constraint_list(substream->runtime, 0,
+                                         SNDRV_PCM_HW_PARAM_RATE,
+                                         &ak4458_rate_constraints);
 }
 
 static const struct snd_soc_dai_ops ak4458_dai_ops = {