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)
committerMark Brown <broonie@kernel.org>
Fri, 4 Jan 2019 13:49:23 +0000 (13:49 +0000)
commit8c3590de0a378c2449fc1aec127cc693632458e4
treec800ec541c9d7d28ecaaa11094e07d0ed8ee31b1
parent22c7d5e7bad1fb2d8b9c611acb55a389f5d848d8
ASoC: Variable "val" in function rt274_i2c_probe() could be uninitialized

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>
sound/soc/codecs/rt274.c