]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
OPP: Free OPP table properly on performance state irregularities
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 11 Sep 2018 05:44:34 +0000 (11:14 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 19 Sep 2018 21:56:39 +0000 (14:56 -0700)
The OPP table was freed, but not the individual OPPs which is done from
_dev_pm_opp_remove_table(). Fix it by calling _dev_pm_opp_remove_table()
as well.

Cc: 4.18 <stable@vger.kernel.org> # v4.18
Fixes: 3ba98324e81a ("PM / OPP: Get performance state using genpd helper")
Tested-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/of.c

index 7af0ddec936bb422c44e0cd2f92b89d6723579ee..20988c42665017bea3402c0b0c67f7d1d1e91608 100644 (file)
@@ -425,6 +425,7 @@ static int _of_add_opp_table_v2(struct device *dev, struct device_node *opp_np)
                dev_err(dev, "Not all nodes have performance state set (%d: %d)\n",
                        count, pstate_count);
                ret = -ENOENT;
+               _dev_pm_opp_remove_table(opp_table, dev, false);
                goto put_opp_table;
        }