]> git.ipfire.org Git - thirdparty/kernel/stable.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:59:35 +0000 (17:59 +0100)
commit35f12da8d4a63ad59060f7849972e1d68fd2b200
treed24b64fe46f427a43a3e2191d2ddbe4e7fb76657
parentfbb47570f648fc5d5628071e7ff2934c16c23a53
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