diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-11-06 16:30:36 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-11-07 13:55:25 +0300 |
commit | cc20c4df1627dd515ea90dd20e2684a8a1c76693 (patch) | |
tree | 4571f73079ab7b4eeafc3bf4bcd4d4648029f0df /sound/soc/intel/skylake | |
parent | adebc5321852da0b6ed13888e3aa291dfb011072 (diff) | |
download | linux-cc20c4df1627dd515ea90dd20e2684a8a1c76693.tar.xz |
ASoC: intel: initialize return value properly
When CONFIG_SND_SOC_HDAC_HDMI is disabled, we can run into an
uninitialized variable:
sound/soc/intel/skylake/skl.c: In function 'skl_resume':
sound/soc/intel/skylake/skl.c:326:6: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
I have run into this on today's linux-next kernel, but it appears
that this is an older problem that was just hard to trigger
with randconfig builds as CONFIG_SND_SOC_HDAC_HDMI would in
effect be impossible to disable when having SND_SOC_INTEL_SKYLAKE
enabled.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/skylake')
-rw-r--r-- | sound/soc/intel/skylake/skl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index 31d8634e8aa1..acb0ab470ca6 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -355,6 +355,7 @@ static int skl_resume(struct device *dev) if (ebus->cmd_dma_state) snd_hdac_bus_init_cmd_io(&ebus->bus); + ret = 0; } else { ret = _skl_resume(ebus); |