iio:accel:adxl367: fix missing unlock on error in adxl367_buffer_predisable()
PATCH 1/1 iio:accel:adxl367: fix missing unlock on error in adxl367_buffer_predisable()
Add the missing unlock before return from function adxl367_buffer_predisable() in the error handling case.
--- drivers/iio/accel/adxl367.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/adxl367.c +1 -1
@@ -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);
Signature · 1 line
2.25.1
Quoted 38 lines
-----Original Message-----
From: Yang Yingliang <[email protected]>
Sent: Thursday, February 24, 2022 4:03 AM
To: [email protected]; [email protected]
Cc: [email protected]; Tanislav, Cosmin <[email protected]>
Subject: [PATCH -next] iio:accel:adxl367: fix missing unlock on error inadxl367_buffer_predisable()[External]
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 <[email protected]>Signed-off-by Yang Yingliang <[email protected]>--- drivers/iio/accel/adxl367.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/accel/adxl367.c +1
-1@@ -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-Quoted 1 line
active_scan_mask,false);
--
2.25.1
Jonathan Cameron
maintainerQuoted 1 line · Cosmin
Reviewed-by Cosmin Tanislav <[email protected]>
Sorry. I normally try to pick up the earliest fix when I get multiple fixes for the same thing but I failed to notice yours before applying the one Dan sent out!
As a result I've already picked that one up
Thanks for the patch though and I'll check more carefully next time!
Jonathan
Quoted 40 lines
Quoted 39 lines
-----Original Message-----
From: Yang Yingliang <[email protected]>
Sent: Thursday, February 24, 2022 4:03 AM
To: [email protected]; [email protected]
Cc: [email protected]; Tanislav, Cosmin <[email protected]>
Subject: [PATCH -next] iio:accel:adxl367: fix missing unlock on error inadxl367_buffer_predisable()[External]
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 <[email protected]>Signed-off-by Yang Yingliang <[email protected]>--- drivers/iio/accel/adxl367.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/accel/adxl367.c +1
-1@@ -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-Quoted 1 line
active_scan_mask,false);
--
2.25.1