diff mbox series

[08/10] ASoC: wcd9335: clarify return value

Message ID 20210218222916.89809-9-pierre-louis.bossart@linux.intel.com
State Accepted
Commit 8d2f2d7ff3c69e1b7a2d1424e4d2dc8a6fe77849
Headers show
Series ASoC: qcom: remove cppcheck warnings | expand

Commit Message

Pierre-Louis Bossart Feb. 18, 2021, 10:29 p.m. UTC
cppcheck warning:

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

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

Patch

diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c
index 9ddfed797b7e..adb325fac930 100644
--- a/sound/soc/codecs/wcd9335.c
+++ b/sound/soc/codecs/wcd9335.c
@@ -5213,7 +5213,7 @@  static int wcd9335_slim_status(struct slim_device *sdev,
 
 	wcd9335_probe(wcd);
 
-	return ret;
+	return 0;
 }
 
 static const struct slim_device_id wcd9335_slim_id[] = {