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

Commit 51e69715 authored by Jishnu Prakash's avatar Jishnu Prakash
Browse files

hwmon: qpnp-adc: Correct return statement in VADC HC read API



Remove return statement in case of failure to write to calibration
peripheral and replace with goto statement to ensure mutex is released.

Change-Id: Iea91c80f5049d4ad7cb43a9ce8e7338ad522624d
Signed-off-by: default avatarJishnu Prakash <jprakash@codeaurora.org>
parent 93bc65b1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -749,7 +749,7 @@ int32_t qpnp_vadc_hc_read(struct qpnp_vadc_chip *vadc,
				QPNP_VADC_CAL_DELAY_CTL_1, &val, 1);
		if (rc < 0) {
			pr_err("qpnp adc write cal_delay failed with %d\n", rc);
			return rc;
			goto fail_unlock;
		}
	}