summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOsvaldo Banuelos <osvaldob@codeaurora.org>2016-03-01 17:17:03 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:23:16 -0700
commit70dcea8217e4525c8aacf4502a4c9d65b8cc5b46 (patch)
treec4a1c1255c643c205626df7ea3dab808f851a2ca
parenta6edd41539fbd573980509cdc06efaf3cfb6aeb4 (diff)
regulator: cpr3-util: add missing error code return statement
Change 64fec1f302ee21759bb4c6d7178a5d8a0aefe779 ("regulator: cpr3-regulator: add support for CPRh-compliant controllers") refactored cpr3_parse_common_ctrl_data() and introduced a bug returning the error code after a VDD regulator get failure. Fix this. Change-Id: I486151ce61dab3c3f5a05daa2325386aacdd9960 CRs-Fixed: 984037 Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
-rw-r--r--drivers/regulator/cpr3-util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/regulator/cpr3-util.c b/drivers/regulator/cpr3-util.c
index 46e4045bbd6b..d208e8a10ced 100644
--- a/drivers/regulator/cpr3-util.c
+++ b/drivers/regulator/cpr3-util.c
@@ -1059,11 +1059,10 @@ int cpr3_parse_common_ctrl_data(struct cpr3_controller *ctrl)
ctrl->vdd_regulator = devm_regulator_get(ctrl->dev, "vdd");
if (IS_ERR(ctrl->vdd_regulator)) {
rc = PTR_ERR(ctrl->vdd_regulator);
- if (rc != -EPROBE_DEFER) {
+ if (rc != -EPROBE_DEFER)
cpr3_err(ctrl, "unable request vdd regulator, rc=%d\n",
rc);
- return rc;
- }
+ return rc;
}
ctrl->system_regulator = devm_regulator_get_optional(ctrl->dev,