Home
last modified time | relevance | path

Searched hist:"9960 c709" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/iio/common/st_sensors/
H A Dst_sensors_core.c9960c709 Tue Jan 21 10:17:57 CST 2020 Colin Ian King <colin.king@canonical.com> 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>
9960c709 Tue Jan 21 10:17:57 CST 2020 Colin Ian King <colin.king@canonical.com> 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>