linux/drivers/iio/common/st_sensors
Colin Ian King 9960c70949 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: 3ce85cc4fb ("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>
2020-02-14 12:08:22 +00:00
..
Kconfig iio: st_sensors: Fix build error 2019-08-25 18:57:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
st_sensors_buffer.c iio: make st_sensors drivers use regmap 2019-07-27 22:52:06 +01:00
st_sensors_core.c iio: st_sensors: handle memory allocation failure to fix null pointer dereference 2020-02-14 12:08:22 +00:00
st_sensors_core.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
st_sensors_i2c.c iio: st_sensors: Drop redundant parameter from st_sensors_of_name_probe() 2020-01-13 21:51:52 +00:00
st_sensors_spi.c iio: st_sensors: Make use of device properties 2020-01-13 21:53:39 +00:00
st_sensors_trigger.c iio: st_sensors: Describe function parameters in kernel-doc 2019-12-29 15:20:05 +00:00