iio: Return -ENODEV for file operations if the device has been unregistered
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 4 Oct 2013 11:06:00 +0000 (12:06 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 12 Oct 2013 11:04:17 +0000 (12:04 +0100)
commitf18e7a068a0a31250cdb251810f8f6224931c3f5
tree9692a94465954c615370dec9cd82baeb4387a211
parent9e69c935fad9fd5f0550c51e3bd251cd30033136
iio: Return -ENODEV for file operations if the device has been unregistered

If the IIO device has been unregistered return -ENODEV for any further file
operations like read() and ioctl(). This avoids userspace being able to grab new
references to the device.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-buffer.c
drivers/iio/industrialio-core.c
drivers/iio/industrialio-event.c