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)
commit89e551e83869732d5b9fd21d7cfdb1f8d62cf5d0
tree26e88102007dacf147c53a411f5e34217f8b374d
parent02fb29882d5ccfad352a310cc6fb9ad9d6daad70
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: 5ea428595cc5 ("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