Skip to content
Unverified Commit 966e927b authored by Kangjie Lu's avatar Kangjie Lu Committed by Mark Brown
Browse files

drivers/regulator: fix a missing check of return value



If palmas_smps_read() fails, we should not use the read data in "reg"
which may contain random value. The fix inserts a check for the return
value of palmas_smps_read(): If it fails, we return the error code
upstream and stop using "reg".

Signed-off-by: default avatarKangjie Lu <kjlu@umn.edu>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 22a5a4a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment