iio: adc: fix a potential NULL pointer dereference
authorKangjie Lu <kjlu@umn.edu>
Sat, 9 Mar 2019 04:53:55 +0000 (22:53 -0600)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 4 Apr 2019 19:19:53 +0000 (20:19 +0100)
commit13814627c9658cf8382dd052bc251ee415670a55
tree1096799b4f1e422dbb11495ef57ff4656019da51
parentd43102f525d9d7a727e086d23e7c27dd665a36d4
iio: adc: fix a potential NULL pointer dereference

devm_iio_trigger_alloc may fail and return NULL. The fix returns
ENOMEM when it fails.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/mxs-lradc-adc.c