summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Collins <collinsd@codeaurora.org>2016-05-23 16:39:45 -0700
committerDavid Collins <collinsd@codeaurora.org>2016-09-01 10:40:44 -0700
commitdcd02f784826690ce0752080600013b051f6de0c (patch)
treea629fcd3f06ee73562a35f29a473d6fbbd79f78a
parente97b6a0e0217f7c072fdad6c50673cd7a64348e1 (diff)
regulator: cpr3-regulator: correct CPR aging cleanup handling
Correct the condition checked in the CPR aging error cleanup path so that a return code of 0 (success) is not returned when the aging measurement fails. Also, correct the order of the arguments in the aging failure error message. Change-Id: Ica925da95b5ab35f63bb0355470475733080a88c CRs-Fixed: 1061372 Signed-off-by: David Collins <collinsd@codeaurora.org>
-rw-r--r--drivers/regulator/cpr3-regulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/cpr3-regulator.c b/drivers/regulator/cpr3-regulator.c
index 9e400a9eee5c..466c96eff806 100644
--- a/drivers/regulator/cpr3-regulator.c
+++ b/drivers/regulator/cpr3-regulator.c
@@ -3523,7 +3523,7 @@ cleanup:
if (ctrl->ctrl_type == CPR_CTRL_TYPE_CPR4) {
rc2 = cpr3_ctrl_clear_cpr4_config(ctrl);
- if (rc) {
+ if (rc2) {
cpr3_err(ctrl, "failed to clear CPR4 configuration,rc=%d\n",
rc2);
rc = rc2;
@@ -3798,7 +3798,7 @@ static int cpr3_regulator_aging_adjust(struct cpr3_controller *ctrl)
max_aging_volt = max(max_aging_volt, aging_volt);
} else {
cpr3_err(ctrl, "CPR aging measurement failed after %d tries, rc=%d\n",
- rc, CPR3_AGING_RETRY_COUNT);
+ j, rc);
ctrl->aging_failed = true;
ctrl->aging_required = false;
goto cleanup;