diff mbox series

[3/8] ASoC: sh: rcar: simplify return

Message ID 20210219231635.5749-4-pierre-louis.bossart@linux.intel.com (mailing list archive)
State Accepted
Commit 652fc90f9de4ab0ba023cbdf5b0853f9447d7966
Headers show
Series ASoC: sh: remove cppcheck warnings | expand

Commit Message

Pierre-Louis Bossart Feb. 19, 2021, 11:16 p.m. UTC
cppcheck warning:

sound/soc/sh/rcar/core.c:219:9: warning: Identical condition and
return expression 'ret', return value is always 0
[identicalConditionAfterEarlyExit]
 return ret;
        ^
sound/soc/sh/rcar/core.c:210:6: note: If condition 'ret' is true, the
function will return/exit
 if (ret)
     ^
sound/soc/sh/rcar/core.c:219:9: note: Returning identical expression
'ret'
 return ret;
        ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/sh/rcar/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index c405bf3b4c99..b1a75509851a 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -216,7 +216,7 @@  int rsnd_mod_init(struct rsnd_priv *priv,
 	mod->clk	= clk;
 	mod->priv	= priv;
 
-	return ret;
+	return 0;
 }
 
 void rsnd_mod_quit(struct rsnd_mod *mod)