From 62386bac68302927219ac16faa388d44d564d2fe Mon Sep 17 00:00:00 2001 From: David Lin Date: Thu, 28 Jun 2018 12:02:05 -0700 Subject: [PATCH] thermal: qpnp-adc-tm: Fix inconsistent locking This patch addresses the following locking error: qpnp-adc-tm.c:2979 qpnp_adc_tm_disable_chan_meas() warn: inconsistent returns 'mutex:&chip->adc->adc_lock' Bug: 77543262 Test: build & boot Change-Id: I65ed72180740598a3aef7af72c6e25b297996782 Signed-off-by: David Lin --- drivers/thermal/qpnp-adc-tm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/qpnp-adc-tm.c b/drivers/thermal/qpnp-adc-tm.c index 64ff2843afd8..32489c043103 100644 --- a/drivers/thermal/qpnp-adc-tm.c +++ b/drivers/thermal/qpnp-adc-tm.c @@ -2938,21 +2938,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; } }