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

Commit fc5fd4ef authored by Osvaldo Banuelos's avatar Osvaldo Banuelos
Browse files

regulator: cpr3-util: add missing error code return statement



Change 64fec1f3 ("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: default avatarOsvaldo Banuelos <osvaldob@codeaurora.org>
parent a8371783
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1045,12 +1045,11 @@ 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;
	}
	}

	ctrl->system_regulator = devm_regulator_get_optional(ctrl->dev,
								"system");