commit | 472b39c3d1bba0616eb0e9a8fa3ad0f56927c7d7 | [log] [tgz] |
---|---|---|
author | Yizhuo <yzhai003@ucr.edu> | Thu Oct 03 10:58:13 2019 -0700 |
committer | Mark Brown <broonie@kernel.org> | Fri Oct 04 18:45:43 2019 +0100 |
tree | e144268c2dd33bbb0b783e27f9ca46b1aac03916 | |
parent | 87fd0db6d7df1cf4cc6e9b09e2155d1f324bf836 [diff] |
regulator: max8907: Fix the usage of uninitialized variable in max8907_regulator_probe() Inside function max8907_regulator_probe(), variable val could be uninitialized if regmap_read() fails. However, val is used later in the if statement to decide the content written to "pmic", which is potentially unsafe. Signed-off-by: Yizhuo <yzhai003@ucr.edu> Link: https://lore.kernel.org/r/20191003175813.16415-1-yzhai003@ucr.edu Signed-off-by: Mark Brown <broonie@kernel.org>