linux/drivers/opp
Manivannan Sadhasivam 7ddd8deb1c OPP: Fix potential null ptr dereference in dev_pm_opp_get_required_pstate()
"opp" pointer is dereferenced before the IS_ERR_OR_NULL() check. Fix it by
removing the dereference to cache opp_table and dereference it directly
where opp_table is used.

This fixes the following smatch warning:

drivers/opp/core.c:232 dev_pm_opp_get_required_pstate() warn: variable
dereferenced before IS_ERR check 'opp' (see line 230)

Fixes: 84cb7ff35f ("OPP: pstate is only valid for genpd OPP tables")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2023-07-24 13:31:17 +05:30
..
core.c OPP: Fix potential null ptr dereference in dev_pm_opp_get_required_pstate() 2023-07-24 13:31:17 +05:30
cpu.c OPP: Use consistent names for OPP table instances 2022-07-08 11:27:50 +05:30
debugfs.c OPP: Simplify the over-designed pstate <-> level dance 2023-06-19 09:50:09 +05:30
Kconfig drivers/opp: Remove "select SRCU" 2023-01-05 11:47:21 +05:30
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
of.c OPP: Properly propagate error along when failing to get icc_path 2023-06-27 07:35:14 +05:30
opp.h OPP: Simplify the over-designed pstate <-> level dance 2023-06-19 09:50:09 +05:30
ti-opp-supply.c OPP: ti: Migrate to dev_pm_opp_set_config_regulators() 2022-07-08 11:27:49 +05:30