diff options
| author | Colin Ian King <colin.king@canonical.com> | 2020-01-21 16:17:57 +0000 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-02-14 12:08:22 +0000 |
| commit | 9960c70949d4356abed8747a20637e0946bb0bad (patch) | |
| tree | 97d01373ca3f277f92508661ce22ee01c35cfe7f /tools/perf/scripts/python/stackcollapse.py | |
| parent | cef2760954cf4f8228d14af9bd0b77a021979278 (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 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
