[alsa-devel] [PATCH 06/18] ASoC: Intel: kbl_da7219_max98927: test return value on route add
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Mon Jan 13 22:04:16 CET 2020
Fix cppcheck warning:
[sound/soc/intel/boards/kbl_da7219_max98927.c:340] ->
[sound/soc/intel/boards/kbl_da7219_max98927.c:348]: (style) Variable
'ret' is reassigned a value before the old one has been used.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
---
sound/soc/intel/boards/kbl_da7219_max98927.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/intel/boards/kbl_da7219_max98927.c b/sound/soc/intel/boards/kbl_da7219_max98927.c
index 34e734adac19..e8b2ec60fb03 100644
--- a/sound/soc/intel/boards/kbl_da7219_max98927.c
+++ b/sound/soc/intel/boards/kbl_da7219_max98927.c
@@ -341,6 +341,9 @@ static int kabylake_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)
kabylake_ssp1_map,
ARRAY_SIZE(kabylake_ssp1_map));
+ if (ret)
+ return ret;
+
/*
* Headset buttons map to the google Reference headset.
* These can be configured by userspace.
--
2.20.1
More information about the Alsa-devel
mailing list