linux-hardened/sound/soc/intel/atom
Arnd Bergmann 1539c7f23f
ASoC: Intel: mrfld: fix uninitialized variable access
Randconfig testing revealed a very old bug, with gcc-8:

sound/soc/intel/atom/sst/sst_loader.c: In function 'sst_load_fw':
sound/soc/intel/atom/sst/sst_loader.c:357:5: error: 'fw' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  if (fw == NULL) {
     ^
sound/soc/intel/atom/sst/sst_loader.c:354:25: note: 'fw' was declared here
  const struct firmware *fw;

We must check the return code of request_firmware() before we look at the
pointer result that may be uninitialized when the function fails.

Fixes: 9012c9544e ("ASoC: Intel: mrfld - Add DSP load and management")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-05 10:38:19 +00:00
..
sst ASoC: Intel: mrfld: fix uninitialized variable access 2018-11-05 10:38:19 +00:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sst-atom-controls.c ASoC: intel: atom: replace platform to component 2018-02-12 11:45:09 +00:00
sst-atom-controls.h ASoC: Intel: Atom: add definitions for modem/SSP0 interface 2016-08-15 15:14:57 +01:00
sst-mfld-dsp.h ASoC: Intel: create atom folder and move atom platform files in 2015-04-06 17:49:45 +01:00
sst-mfld-platform-compress.c ASoC: intel: atom: replace platform to component 2018-02-12 11:45:09 +00:00
sst-mfld-platform-pcm.c ASoC: add for_each_card_rtds() macro 2018-09-20 10:21:28 -07:00
sst-mfld-platform.h ASoC: intel: atom: replace platform to component 2018-02-12 11:45:09 +00:00