Re: [PATCH] iio: max9611: fix a NULL pointer dereference

2019-03-09 Thread Jonathan Cameron
On Sat, 9 Mar 2019 16:19:17 +0100 Tomasz Duszynski wrote: > On Fri, Mar 08, 2019 at 10:51:40PM -0600, Kangjie Lu wrote: > > of_match_device may return NULL when it fails, and in this case, > > there will be a NULL pointer dereference. The fix returns > > EINVAL when of_match_device returns NULL.

Re: [PATCH] iio: max9611: fix a NULL pointer dereference

2019-03-09 Thread Tomasz Duszynski
On Fri, Mar 08, 2019 at 10:51:40PM -0600, Kangjie Lu wrote: > of_match_device may return NULL when it fails, and in this case, > there will be a NULL pointer dereference. The fix returns > EINVAL when of_match_device returns NULL. > > Signed-off-by: Kangjie Lu > --- > drivers/iio/adc/max9611.c |

[PATCH] iio: max9611: fix a NULL pointer dereference

2019-03-08 Thread Kangjie Lu
of_match_device may return NULL when it fails, and in this case, there will be a NULL pointer dereference. The fix returns EINVAL when of_match_device returns NULL. Signed-off-by: Kangjie Lu --- drivers/iio/adc/max9611.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git