From 70dcea8217e4525c8aacf4502a4c9d65b8cc5b46 Mon Sep 17 00:00:00 2001 From: Osvaldo Banuelos Date: Tue, 1 Mar 2016 17:17:03 -0800 Subject: [PATCH] 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 --- drivers/regulator/cpr3-util.c | 5 ++--- 1 file 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,