Skip to content

Commit 3d2398f

Browse files
committed
OPP: Move break out of scoped_guard in dev_pm_opp_xlate_required_opp()
The commit ff9c512 ("OPP: Use mutex locking guards") unintentionally made the for loop run longer than required. scoped_guard() is implemented as a for loop. The break statement now breaks out out the scoped_guard() and not out of the outer for loop. The outer loop always iterates to completion. Fix it. Fixes: ff9c512 ("OPP: Use mutex locking guards") Reported-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent e560083 commit 3d2398f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/opp/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2742,8 +2742,8 @@ struct dev_pm_opp *dev_pm_opp_xlate_required_opp(struct opp_table *src_table,
27422742
break;
27432743
}
27442744
}
2745-
break;
27462745
}
2746+
break;
27472747
}
27482748

27492749
if (IS_ERR(dest_opp)) {

0 commit comments

Comments
 (0)