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)
committerMark Brown <broonie@kernel.org>
Tue, 1 Oct 2019 17:36:42 +0000 (18:36 +0100)
commit1252b283141f03c3dffd139292c862cae10e174d
treebfdb5e1ecb4bb6a978405dcfcf422e9b29eab20e
parentf75841aa3b4bf02fcc7941af2d3e00ff74a93bdb
regulator: pfuze100-regulator: Variable "val" in pfuze100_regulator_probe() could be uninitialized

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>
drivers/regulator/pfuze100-regulator.c