iio: imu: bmi323: Fix trigger notification in case of error
Subsystems (2)
PATCH 1/1 iio: imu: bmi323: Fix trigger notification in case of error
In case of error in the bmi323_trigger_handler() function, the function exits without calling the iio_trigger_notify_done() which is responsible for informing the attached trigger that the process is done and in case there is a .reenable(), to call it.
--- drivers/iio/imu/bmi323/bmi323_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/iio/imu/bmi323/bmi323_core.c +3 -2
@@ -1391,7 +1391,7 @@ static irqreturn_t bmi323_trigger_handler(int irq, void *p) &data->buffer.channels, ARRAY_SIZE(data->buffer.channels));if (ret) -return IRQ_NONE ; + goto out; }else {for_each_set_bit (bit, indio_dev->active_scan_mask,BMI323_CHAN_MAX ) {
@@ -1400,13 +1400,14 @@ static irqreturn_t bmi323_trigger_handler(int irq, void *p) &data->buffer.channels[index++], BMI323_BYTES_PER_SAMPLE);if (ret) -return IRQ_NONE ; + goto out; } }iio_push_to_buffers_with_timestamp (indio_dev, &data->buffer,iio_get_time_ns (indio_dev)); +out:iio_trigger_notify_done (indio_dev->trig);return IRQ_HANDLED ;
base-commit: dccb07f2914cdab2ac3a5b6c98406f765acab803
Signature · 1 line
2.25.1
Jonathan Cameron
maintainerQuoted 8 lines · On Wed, 8 May 2024 17:54:07 +0200 Vasileios Amoiridis…
In case of error in the
bmi323_trigger_handler()function, the function exits without calling theiio_trigger_notify_done()which is responsible for informing the attached trigger that the process is done and in case there is a .reenable(), to call it.Fixes 8a636db3aa57 ("iio: imu: Add driver for BMI323 IMU")Signed-off-by Vasileios Amoiridis <[email protected]>
I've applied this to a temporary fixes-for-6.10-rc1 that will get rebased on top of an update char-misc-linus once the Linus picks up a pull request from Greg during the coming merge window.
I've done this for other patches that may be dependent on stuff that is only in char-misc-next.
Jonathan
Quoted 35 lines
--- drivers/iio/imu/bmi323/bmi323_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/iio/imu/bmi323/bmi323_core.c +3
-2@@ -1391,7 +1391,7 @@ static irqreturn_t bmi323_trigger_handler(int irq, void *p) &data->buffer.channels, ARRAY_SIZE(data->buffer.channels));if (ret) -return IRQ_NONE ; + goto out; }else {for_each_set_bit (bit, indio_dev->active_scan_mask,BMI323_CHAN_MAX ) {@@ -1400,13 +1400,14 @@ static irqreturn_t bmi323_trigger_handler(int irq, void *p) &data->buffer.channels[index++], BMI323_BYTES_PER_SAMPLE);if (ret) -return IRQ_NONE ; + goto out; } }iio_push_to_buffers_with_timestamp (indio_dev, &data->buffer,iio_get_time_ns (indio_dev)); +out:iio_trigger_notify_done (indio_dev->trig);return IRQ_HANDLED ;base-commit:
dccb07f2914cdab2ac3a5b6c98406f765acab803