]> git.baikalelectronics.ru Git - kernel.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)
committerMark Brown <broonie@kernel.org>
Fri, 4 Jan 2019 13:49:23 +0000 (13:49 +0000)
commite6bfa2e5c3860709cd58a2cf595c5c0eddf799aa
treec800ec541c9d7d28ecaaa11094e07d0ed8ee31b1
parent1222b31901cb409f1a8eeada0e676726af085409
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