diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2018-09-11 11:14:34 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-13 11:08:39 -0800 |
commit | ed6fea0059e57b40331280333fd7c682e3f370a0 (patch) | |
tree | b0eb1a751ec86b6fa873f13dd6907baf094d83c7 /drivers/opp | |
parent | 5cfb4a68693d9dd335934032a6ffbf241b33b3bb (diff) |
OPP: Free OPP table properly on performance state irregularities
commit 2fbb8670b4ff4454f1c0de510f788d737edc4b90 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/opp')
-rw-r--r-- | drivers/opp/of.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/opp/of.c b/drivers/opp/of.c index 7af0ddec936b..20988c426650 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -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; } |