]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: cs43130: Fix possible Oops with invalid dev_id
authorTakashi Iwai <tiwai@suse.de>
Mon, 4 Sep 2017 13:54:47 +0000 (15:54 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 4 Sep 2017 14:45:09 +0000 (15:45 +0100)
commitdb62121bc58751da59e71f854f61935b434e5b9f
tree863552d36b7449431680f4f17226168c802694be
parenta91b58881bac270e8de56561f841507d7a7ae7c0
ASoC: cs43130: Fix possible Oops with invalid dev_id

As compiler spotted out, there is the potential NULL-dereference in
the code when dc-measure OF is given for other than 43130/43131:
  sound/soc/codecs/cs43130.c:2089:18: warning: ‘hpload_seq’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Warn it and return before triggering Oops.

Fixes: 08c3e3bd63a0 ("ASoC: cs43130: Add support for CS43130 codec")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs43130.c