diff options
author | 2023-07-21 18:16:33 +0530 | |
---|---|---|
committer | 2023-07-24 13:31:17 +0530 | |
commit | 7ddd8deb1c3c0363a7e14fafb5df26e2089a69a5 (patch) | |
tree | fa737024ea531c153c3a34299d015e4cd7bd0d31 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | OPP: Reuse dev_pm_opp_get_freq_indexed() (diff) | |
download | wireguard-linux-7ddd8deb1c3c0363a7e14fafb5df26e2089a69a5.tar.xz wireguard-linux-7ddd8deb1c3c0363a7e14fafb5df26e2089a69a5.zip |
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: 84cb7ff35fcf ("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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions