aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/industrialio-buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/industrialio-buffer.c')
-rw-r--r--drivers/iio/industrialio-buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index ac185b8694bd..2f35db93cdb6 100644
--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -553,6 +553,10 @@ int iio_sw_buffer_preenable(struct iio_dev *indio_dev)
553 buffer->scan_mask); 553 buffer->scan_mask);
554 else 554 else
555 indio_dev->active_scan_mask = buffer->scan_mask; 555 indio_dev->active_scan_mask = buffer->scan_mask;
556
557 if (indio_dev->active_scan_mask == NULL)
558 return -EINVAL;
559
556 iio_update_demux(indio_dev); 560 iio_update_demux(indio_dev);
557 561
558 if (indio_dev->info->update_scan_mode) 562 if (indio_dev->info->update_scan_mode)