iio: adis_buffer: do not return ints in irq handlers
[ Upstream commitd877539ad8] 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:ccd2b52f4a("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
67d88b7bf6
commit
2e41116e6e
@@ -129,9 +129,6 @@ static irqreturn_t adis_trigger_handler(int irq, void *p)
|
|||||||
struct adis *adis = iio_device_get_drvdata(indio_dev);
|
struct adis *adis = iio_device_get_drvdata(indio_dev);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!adis->buffer)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
if (adis->data->has_paging) {
|
if (adis->data->has_paging) {
|
||||||
mutex_lock(&adis->state_lock);
|
mutex_lock(&adis->state_lock);
|
||||||
if (adis->current_page != 0) {
|
if (adis->current_page != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user