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

kbuild test robot fengguang.wu at intel.com
Tue Dec 18 16:26:39 CET 2018


From: kbuild test robot <fengguang.wu at intel.com>

sound/soc/codecs/cs35l36.c:513:5-8: Unneeded variable: "ret". Return "0" on line 554


 Remove unneeded variable used to store return value.

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

Fixes: 28343ecbec19 ("ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier")
CC: James Schulman <james.schulman at cirrus.com>
Signed-off-by: kbuild test robot <fengguang.wu at intel.com>
---

url:    https://github.com/0day-ci/linux/commits/James-Schulman/ASoC-cs35l36-Add-support-for-Cirrus-CS35L36-Amplifier/20181218-063001
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

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

 cs35l36.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/sound/soc/codecs/cs35l36.c
+++ b/sound/soc/codecs/cs35l36.c
@@ -510,7 +510,6 @@ static int cs35l36_main_amp_event(struct
 	struct cs35l36_private *cs35l36 =
 			snd_soc_component_get_drvdata(component);
 	u32 reg;
-	int ret = 0;
 
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMU:
@@ -551,7 +550,7 @@ static int cs35l36_main_amp_event(struct
 		dev_dbg(component->dev, "Invalid event = 0x%x\n", event);
 	}
 
-	return ret;
+	return 0;
 }
 
 static int cs35l36_boost_event(struct snd_soc_dapm_widget *w,


More information about the Alsa-devel mailing list