linux/drivers/iio/common
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
..
cros_ec_sensors cros_ec: treewide: Remove 'include/linux/mfd/cros_ec.h' 2020-01-07 17:36:46 +01:00
hid-sensors iio: hid-sensor-attributes: Fix divisions for 32-bit platforms 2019-09-06 08:09:34 +02:00
ms_sensors treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ssp_sensors iio: ssp_sensors: Convert to use GPIO descriptors 2019-12-15 11:42:17 +00:00
st_sensors iio: st_sensors: handle memory allocation failure to fix null pointer dereference 2020-02-14 12:08:22 +00:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00