Re: [PATCH] iio: adc: fix a potential NULL pointer dereference

2019-03-09 Thread Jonathan Cameron
On Fri, 8 Mar 2019 22:53:55 -0600 Kangjie Lu wrote: > devm_iio_trigger_alloc may fail and return NULL. The fix returns > ENOMEM when it fails. > > Signed-off-by: Kangjie Lu Seems obviously correct to me. As it's been there a 'while' I'm not going to rush it in however. This can wait for the n

[PATCH] iio: adc: fix a potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
devm_iio_trigger_alloc may fail and return NULL. The fix returns ENOMEM when it fails. Signed-off-by: Kangjie Lu --- drivers/iio/adc/mxs-lradc-adc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/adc/mxs-lradc-adc.c b/drivers/iio/adc/mxs-lradc-adc.c index c627513d9f0f..5384472