Commit 29ba0285 authored by David Collins's avatar David Collins
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 4853ae4f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment