diff mbox series

[15/16] ASoC: samsung: snow: simplify error handling

Message ID 20220520211719.607543-16-pierre-louis.bossart@linux.intel.com (mailing list archive)
State Accepted
Commit 0c57064e3fdba9bb76086b9a6e318eb0cef24b69
Headers show
Series ASoC: trivial changes for cppcheck warnings | expand

Commit Message

Pierre-Louis Bossart May 20, 2022, 9:17 p.m. UTC
cppcheck warning:

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

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: P├ęter Ujfalusi <peter.ujfalusi@linux.intel.com>
---
 sound/soc/samsung/snow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c
index 02372109c251e..da342da038804 100644
--- a/sound/soc/samsung/snow.c
+++ b/sound/soc/samsung/snow.c
@@ -216,7 +216,7 @@  static int snow_probe(struct platform_device *pdev)
 		return dev_err_probe(&pdev->dev, ret,
 				     "snd_soc_register_card failed\n");
 
-	return ret;
+	return 0;
 }
 
 static int snow_remove(struct platform_device *pdev)