]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: soc-compress: avoid false-positive Wuninitialized warning
authorRong Chen <rong.a.chen@intel.com>
Fri, 24 Apr 2020 00:54:37 +0000 (08:54 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 24 Apr 2020 12:19:12 +0000 (13:19 +0100)
commita045bdade60a5abbea19e97fdcd13751053311c9
tree9d4d8c49cfdd0c67e85d923e82cb1e6482cbcf9c
parent5197583b5a0e584b5b45afc75821374e34f0c08d
ASoC: soc-compress: avoid false-positive Wuninitialized warning

gcc-6.5 and earlier show a new warning:

sound/soc/soc-compress.c: In function ‘soc_compr_open’:
sound/soc/soc-compress.c:75:28: warning: ‘component’ is used uninitialized in this function [-Wuninitialized]
  struct snd_soc_component *component, *save = NULL;
                              ^~~~~~~~~

Simplest fix is to initialize it to avoid the warning.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Rong Chen <rong.a.chen@intel.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/lkml/202004201540.vYPhhYMs%25lkp@intel.com
Link: https://lore.kernel.org/r/20200424005437.3941-1-rong.a.chen@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-compress.c