Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 87ed0ffe authored by David Collins's avatar David Collins Committed by Stephen Boyd
Browse files

msm: rpm-regulator-smd: Correct error handling in rpm_regulator_get()



regulator_get() returns an IS_ERR() condition upon failure.
Therefore, modify the rpm_regulator_get() error handling code to
check for IS_ERR() instead of NULL.

At the same time, replace the NULL check in
rpm_regulator_check_input() with IS_ERR_OR_NULL() to handle the
case of a consumer driver incorrectly calling one of the
rpm_regulator_* functions with an error pointer returned by
rpm_regulator_get().

Change-Id: I2ead0e6609530022114b260832ffc0e734a99fa4
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent 2fdcb67d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment