lkml.org 
[lkml]   [2021]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/23] ASoC: adau1977: remove useless return
Date
Cppcheck warning:

sound/soc/codecs/adau1977.c:242:9: warning: Identical condition and
return expression 'ret', return value is always 0
[identicalConditionAfterEarlyExit]

return ret;
^
sound/soc/codecs/adau1977.c:239:6: note: If condition 'ret' is true,
the function will return/exit

if (ret)
^
sound/soc/codecs/adau1977.c:242:9: note: Returning identical expression 'ret'
return ret;
^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
sound/soc/codecs/adau1977.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c
index 8260f49caa24..e347a48131d1 100644
--- a/sound/soc/codecs/adau1977.c
+++ b/sound/soc/codecs/adau1977.c
@@ -236,8 +236,6 @@ static int adau1977_reset(struct adau1977 *adau1977)
ret = regmap_write(adau1977->regmap, ADAU1977_REG_POWER,
ADAU1977_POWER_RESET);
regcache_cache_bypass(adau1977->regmap, false);
- if (ret)
- return ret;

return ret;
}
--
2.25.1
\
 
 \ /
  Last update: 2021-03-12 19:25    [W:0.112 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site