Linux IIO development
 help / color / mirror / Atom feed
* [PATCH -next] iio:accel:adxl367: fix missing unlock on error in adxl367_buffer_predisable()
@ 2022-02-24  2:03 Yang Yingliang
  2022-02-24  9:38 ` Tanislav, Cosmin
  0 siblings, 1 reply; 3+ messages in thread
From: Yang Yingliang @ 2022-02-24  2:03 UTC (permalink / raw)
  To: linux-kernel, linux-iio; +Cc: jic23, cosmin.tanislav

Add the missing unlock before return from function adxl367_buffer_predisable()
in the error handling case.

Fixes: cbab791c5e2a ("iio: accel: add ADXL367 driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/iio/accel/adxl367.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/accel/adxl367.c b/drivers/iio/accel/adxl367.c
index b452d74b1d4d..bdc95409abed 100644
--- a/drivers/iio/accel/adxl367.c
+++ b/drivers/iio/accel/adxl367.c
@@ -1359,7 +1359,7 @@ static int adxl367_buffer_predisable(struct iio_dev *indio_dev)
 
 	ret = adxl367_set_measure_en(st, true);
 	if (ret)
-		return ret;
+		goto out;
 
 	ret = adxl367_set_temp_adc_mask_en(st, indio_dev->active_scan_mask,
 					   false);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-26 18:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-24  2:03 [PATCH -next] iio:accel:adxl367: fix missing unlock on error in adxl367_buffer_predisable() Yang Yingliang
2022-02-24  9:38 ` Tanislav, Cosmin
2022-02-26 18:08   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox