Home
last modified time | relevance | path

Searched hist:"0 a78b248" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/sound/soc/codecs/
H A Drt5514.c0a78b248 Fri Apr 14 11:40:31 CDT 2017 Douglas Anderson <dianders@chromium.org> ASoC: rt5514: Avoid relying on uninitialized "val" value

In rt5514_i2c_probe() if the regmap_read(RT5514_VENDOR_ID2) fails then
"val" may be left as uninitialized. Current code relies on "val" not
being RT5514_DEVICE_ID, but that's potentially unsafe.

Let's check for errors from regmap_read() and also explicitly init the
value do we're not passing a possibly uninitialized int to printk.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
0a78b248 Fri Apr 14 11:40:31 CDT 2017 Douglas Anderson <dianders@chromium.org> ASoC: rt5514: Avoid relying on uninitialized "val" value

In rt5514_i2c_probe() if the regmap_read(RT5514_VENDOR_ID2) fails then
"val" may be left as uninitialized. Current code relies on "val" not
being RT5514_DEVICE_ID, but that's potentially unsafe.

Let's check for errors from regmap_read() and also explicitly init the
value do we're not passing a possibly uninitialized int to printk.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>