]> git.baikalelectronics.ru Git - kernel.git/commit
iio: buffer: check if a buffer has been set up when poll is called
authorStefan Windfeldt-Prytz <stefan.windfeldt@axis.com>
Thu, 15 Feb 2018 14:02:53 +0000 (15:02 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 17 Feb 2018 16:54:58 +0000 (16:54 +0000)
commit67083a7cb54624c4647ca43608159fb341007b50
tree4b97fb5a8a0ba74b829bfcab703716d1ad07868e
parent8ee14a33f5ccdc1b36d181d1e53986e9eba1cccf
iio: buffer: check if a buffer has been set up when poll is called

If no iio buffer has been set up and poll is called return 0.
Without this check there will be a null pointer dereference when
calling poll on a iio driver without an iio buffer.

Cc: stable@vger.kernel.org
Signed-off-by: Stefan Windfeldt-Prytz <stefan.windfeldt@axis.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-buffer.c