[alsa-devel] [PATCH] ASoC: AMD: fix returnvar.cocci warnings

kbuild test robot lkp at intel.com
Tue Mar 13 05:37:39 CET 2018


From: Fengguang Wu <fengguang.wu at intel.com>

sound/soc/amd/acp-da7219-max98357a.c:104:5-8: Unneeded variable: "ret". Return "0" on line 108


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 7d03b3824d27 ("ASoC: AMD: Enable da7219 master clock using common clock framework")
CC: Akshu Agrawal <akshu.agrawal at amd.com>
Signed-off-by: Fengguang Wu <fengguang.wu at intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

 acp-da7219-max98357a.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/sound/soc/amd/acp-da7219-max98357a.c
+++ b/sound/soc/amd/acp-da7219-max98357a.c
@@ -101,11 +101,9 @@ static int cz_da7219_hw_params(struct sn
 
 static int cz_da7219_hw_free(struct snd_pcm_substream *substream)
 {
-	int ret = 0;
-
 	clk_disable_unprepare(da7219_dai_clk);
 
-	return ret;
+	return 0;
 }
 
 static const unsigned int channels[] = {


More information about the Alsa-devel mailing list