path: root/drivers/opp
diff options
authorDmitry Osipenko <>2021-01-18 03:55:23 +0300
committerViresh Kumar <>2021-02-02 10:27:34 +0530
commitf2f4d2b86f432fecfd76afa5f4f60f47833121b5 (patch)
treecebbaacad76af4c2a26b76a3759c189ce950c3b2 /drivers/opp
parentb4b9e223eccaeec6e05d927c292d4425fd18f243 (diff)
opp: Handle missing OPP table in dev_pm_opp_xlate_performance_state()
NVIDIA Tegra SoCs have a power domains topology such that child domains only clamp a power rail, while parent domain controls shared performance state of the multiple child domains. In this case child's domain doesn't need to have OPP table. Hence we want to allow children power domains to pass performance state to the parent domain if child's domain doesn't have OPP table. The dev_pm_opp_xlate_performance_state() gets src_table=NULL if a child power domain doesn't have OPP table and in this case we should pass the performance state to the parent domain. Tested-by: Peter Geis <> Tested-by: Nicolas Chauvet <> Tested-by: Matt Merhar <> Signed-off-by: Dmitry Osipenko <> Signed-off-by: Viresh Kumar <>
Diffstat (limited to 'drivers/opp')
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index ce0ec5bde22a..0417cd34b805 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2339,7 +2339,7 @@ int dev_pm_opp_xlate_performance_state(struct opp_table *src_table,
* and so none of them have the "required-opps" property set. Return the
* pstate of the src_table as it is in such cases.
- if (!src_table->required_opp_count)
+ if (!src_table || !src_table->required_opp_count)
return pstate;
for (i = 0; i < src_table->required_opp_count; i++) {