thermal: qpnp-adc-tm: release lock upon disable_chan_meas failure

This fixes the smath warning below:

drivers/thermal/qpnp-adc-tm.c:2943 qpnp_adc_tm_disable_chan_meas() warn:
inconsistent returns 'mutex:&chip->adc->adc_lock'.

Bug: 35898203
Change-Id: I149ed4868cd4754246b3b8845a0af7f1f08c0931
Signed-off-by: David Lin <dtwlin@google.com>
This commit is contained in:
David Lin 2017-04-30 16:43:24 -07:00 committed by Timi
parent 77e86943a6
commit f0e5b9bd6f

View file

@ -2915,21 +2915,21 @@ int32_t qpnp_adc_tm_disable_chan_meas(struct qpnp_adc_tm_chip *chip,
QPNP_BTM_Mn_HIGH_THR_INT_EN, false);
if (rc < 0) {
pr_err("high thr disable err:%d\n", btm_chan_num);
return rc;
goto fail;
}
rc = qpnp_adc_tm_reg_update(chip, QPNP_BTM_Mn_EN(btm_chan_num),
QPNP_BTM_Mn_LOW_THR_INT_EN, false);
if (rc < 0) {
pr_err("low thr disable err:%d\n", btm_chan_num);
return rc;
goto fail;
}
rc = qpnp_adc_tm_reg_update(chip, QPNP_BTM_Mn_EN(btm_chan_num),
QPNP_BTM_Mn_MEAS_EN, false);
if (rc < 0) {
pr_err("multi measurement disable failed\n");
return rc;
goto fail;
}
}