]> git.baikalelectronics.ru Git - kernel.git/commit
thermal/drivers/broadcom: Fix potential NULL dereference in sr_thermal_probe
authorZheng Yongjun <zhengyongjun3@huawei.com>
Mon, 25 Apr 2022 09:29:29 +0000 (09:29 +0000)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 19 May 2022 10:11:52 +0000 (12:11 +0200)
commit7a67e7b90b54b0513062c42e0e9fcfe38608a03c
treecfd59a03e35820a0e3e8249e97640616588de4f4
parentfffc1c0ecb953ee9a47b54def15b2a261c0635fd
thermal/drivers/broadcom: Fix potential NULL dereference in sr_thermal_probe

platform_get_resource() may return NULL, add proper check to
avoid potential NULL dereferencing.

Fixes: 9201e3ed327b9 ("thermal: broadcom: Add Stingray thermal driver")
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20220425092929.90412-1-zhengyongjun3@huawei.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/broadcom/sr-thermal.c