Skip to content

Commit d4ec88d

Browse files
bebarinovireshk
authored andcommitted
opp: Put opp table in dev_pm_opp_set_rate() if _set_opp_bw() fails
We get the opp_table pointer at the top of the function and so we should put the pointer at the end of the function like all other exit paths from this function do. Cc: v5.8+ <[email protected]> # v5.8+ Fixes: b00e667 ("opp: Remove bandwidth votes when target_freq is zero") Reviewed-by: Rajendra Nayak <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> [ Viresh: Split the patch into two ] Signed-off-by: Viresh Kumar <[email protected]>
1 parent 8979ef7 commit d4ec88d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/opp/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq)
907907

908908
ret = _set_opp_bw(opp_table, NULL, dev, true);
909909
if (ret)
910-
return ret;
910+
goto put_opp_table;
911911

912912
if (opp_table->regulator_enabled) {
913913
regulator_disable(opp_table->regulators[0]);

0 commit comments

Comments
 (0)