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:
David Collins <collinsd@codeaurora.org>
Loading
Please register or sign in to comment