Skip to content

Commit bedb2cc

Browse files
vamoiridjic23
authored andcommitted
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. Fixes: 8a636db ("iio: imu: Add driver for BMI323 IMU") Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com> Link: https://lore.kernel.org/r/20240508155407.139805-1-vassilisamir@gmail.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 279428d commit bedb2cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/iio/imu/bmi323/bmi323_core.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ static irqreturn_t bmi323_trigger_handler(int irq, void *p)
13911391
&data->buffer.channels,
13921392
ARRAY_SIZE(data->buffer.channels));
13931393
if (ret)
1394-
return IRQ_NONE;
1394+
goto out;
13951395
} else {
13961396
for_each_set_bit(bit, indio_dev->active_scan_mask,
13971397
BMI323_CHAN_MAX) {
@@ -1400,13 +1400,14 @@ static irqreturn_t bmi323_trigger_handler(int irq, void *p)
14001400
&data->buffer.channels[index++],
14011401
BMI323_BYTES_PER_SAMPLE);
14021402
if (ret)
1403-
return IRQ_NONE;
1403+
goto out;
14041404
}
14051405
}
14061406

14071407
iio_push_to_buffers_with_timestamp(indio_dev, &data->buffer,
14081408
iio_get_time_ns(indio_dev));
14091409

1410+
out:
14101411
iio_trigger_notify_done(indio_dev->trig);
14111412

14121413
return IRQ_HANDLED;

0 commit comments

Comments
 (0)