[PATCH 09/10] ASoC: wm_adsp: simplify return value
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Thu Mar 11 01:43:31 CET 2021
cppcheck warning:
sound/soc/codecs/wm_adsp.c:2092:9: warning: Identical condition and
return expression 'ret', return value is always 0
[identicalConditionAfterEarlyExit]
return ret;
^
sound/soc/codecs/wm_adsp.c:2070:6: note: If condition 'ret' is true,
the function will return/exit
if (ret)
^
sound/soc/codecs/wm_adsp.c:2092:9: note: Returning identical
expression 'ret'
return ret;
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
---
sound/soc/codecs/wm_adsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 070ca7d8c661..3dc119daf2f6 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -2079,7 +2079,7 @@ int wm_adsp_write_ctl(struct wm_adsp *dsp, const char *name, int type,
snd_ctl_notify(dsp->component->card->snd_card,
SNDRV_CTL_EVENT_MASK_VALUE, &kcontrol->id);
- return ret;
+ return 0;
}
EXPORT_SYMBOL_GPL(wm_adsp_write_ctl);
--
2.25.1
More information about the Alsa-devel
mailing list