diff options
| author | 2020-01-21 16:17:57 +0000 | |
|---|---|---|
| committer | 2020-02-14 12:08:22 +0000 | |
| commit | 9960c70949d4356abed8747a20637e0946bb0bad (patch) | |
| tree | 97d01373ca3f277f92508661ce22ee01c35cfe7f /kernel/sysctl_binary.c | |
| parent | iio: adc: ad7124: add 3db filter (diff) | |
iio: st_sensors: handle memory allocation failure to fix null pointer dereference
A null pointer deference on pdata can occur if the allocation of
pdata fails. Fix this by adding a null pointer check and handle
the -ENOMEM failure in the caller.
Addresses-Coverity: ("Dereference null return value")
Fixes: 3ce85cc4fbb7 ("iio: st_sensors: get platform data from device tree")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'kernel/sysctl_binary.c')
0 files changed, 0 insertions, 0 deletions
