Skip to content

Commit

Permalink
OPP: Free OPP table properly on performance state irregularities
Browse files Browse the repository at this point in the history
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 <[email protected]> # v4.18
Fixes: 3ba9832 ("PM / OPP: Get performance state using genpd helper")
Tested-by: Niklas Cassel <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
  • Loading branch information
vireshk committed Sep 19, 2018
1 parent 7876320 commit 2fbb867
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/opp/of.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2fbb867

Please sign in to comment.