diff options
Diffstat (limited to 'drivers/staging/iio/iio_dummy_evgen.c')
-rw-r--r-- | drivers/staging/iio/iio_dummy_evgen.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/iio/iio_dummy_evgen.c b/drivers/staging/iio/iio_dummy_evgen.c index da657d1..cdbf289 100644 --- a/drivers/staging/iio/iio_dummy_evgen.c +++ b/drivers/staging/iio/iio_dummy_evgen.c @@ -102,6 +102,10 @@ static int iio_dummy_evgen_create(void) int iio_dummy_evgen_get_irq(void) { int i, ret = 0; + + if (iio_evgen == NULL) + return -ENODEV; + mutex_lock(&iio_evgen->lock); for (i = 0; i < IIO_EVENTGEN_NO; i++) if (iio_evgen->inuse[i] == false) { |