]> git.baikalelectronics.ru Git - kernel.git/commit
soc: samsung: exynos-asv: Potential NULL dereference in exynos_asv_update_opps()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 29 Oct 2019 18:27:42 +0000 (21:27 +0300)
committerKrzysztof Kozlowski <krzk@kernel.org>
Wed, 30 Oct 2019 18:04:32 +0000 (19:04 +0100)
commita65b8f5dcd82c6105b837d4d8d70d782c3d49825
tree26e88102007dacf147c53a411f5e34217f8b374d
parent6598881087a24931bb9b6ad34b054fdc6005c5b9
soc: samsung: exynos-asv: Potential NULL dereference in exynos_asv_update_opps()

The dev_pm_opp_get_opp_table() returns error pointers if it's disabled
in the config and it returns NULL if there is an error.  This code only
checks for error pointers so it could lead to an Oops inside the
dev_pm_opp_put_opp_table() function.

Fixes: 4e3270da0c45 ("soc: samsung: Add Exynos Adaptive Supply Voltage driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
drivers/soc/samsung/exynos-asv.c