regulator: pfuze100-regulator: Variable "val" in pfuze100_regulator_probe() could...
authorYizhuo <yzhai003@ucr.edu>
Sun, 29 Sep 2019 17:09:57 +0000 (10:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Nov 2019 10:27:15 +0000 (11:27 +0100)
commitbab5c14b5c8909d80a7e322613405451b25b11aa
treee58bf734cb0de904fa528b645b69cd468eb96e1d
parent6ef17b446081f41be552991b49c78d980f961a42
regulator: pfuze100-regulator: Variable "val" in pfuze100_regulator_probe() could be uninitialized

[ Upstream commit 1252b283141f03c3dffd139292c862cae10e174d ]

In function pfuze100_regulator_probe(), variable "val" could be
initialized if regmap_read() fails. However, "val" is used to
decide the control flow later in the if statement, which is
potentially unsafe.

Signed-off-by: Yizhuo <yzhai003@ucr.edu>
Link: https://lore.kernel.org/r/20190929170957.14775-1-yzhai003@ucr.edu
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/regulator/pfuze100-regulator.c