]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: Variable "val" in function rt274_i2c_probe() could be uninitialized
authorYizhuo <yzhai003@ucr.edu>
Thu, 3 Jan 2019 21:59:12 +0000 (13:59 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Mar 2019 16:57:58 +0000 (17:57 +0100)
commitc70c6e7f3a41a416a82faddf4f3cfd6c19d48fce
treea778fbb2bc15b3cf44e1feeeab5c2dbf1a89e887
parent34f6404b2b1974845b3d24766c4bfe1739365d1b
ASoC: Variable "val" in function rt274_i2c_probe() could be uninitialized

[ Upstream commit 8c3590de0a378c2449fc1aec127cc693632458e4 ]

Inside function rt274_i2c_probe(), if regmap_read() function
returns -EINVAL, then local variable "val" leaves uninitialized
but used in if statement. This is potentially unsafe.

Signed-off-by: Yizhuo <yzhai003@ucr.edu>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/rt274.c