Skip to content

Commit

Permalink
iio: adis_buffer: do not return ints in irq handlers
Browse files Browse the repository at this point in the history
[ Upstream commit d877539 ]

On an IRQ handler we should not return normal error codes as 'irqreturn_t'
is expected.

Not necessarily stable material as the old check cannot fail, so it's a bug
we can not hit.

Fixes: ccd2b52 ("staging:iio: Add common ADIS library")
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20210422101911.135630-2-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
nunojsa authored and gregkh committed Jul 14, 2021
1 parent aa9f1fc commit 48a4fc2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/iio/imu/adis_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ static irqreturn_t adis_trigger_handler(int irq, void *p)
struct adis *adis = iio_device_get_drvdata(indio_dev);
int ret;

if (!adis->buffer)
return -ENOMEM;

if (adis->data->has_paging) {
mutex_lock(&adis->state_lock);
if (adis->current_page != 0) {
Expand Down

0 comments on commit 48a4fc2

Please sign in to comment.