Skip to content

Commit

Permalink
clk: Assert prepare_lock in clk_core_get_boundaries
Browse files Browse the repository at this point in the history
This function iterates the clk consumer list on clk_core so it must be
called under prepare_lock. This is already done by all callers but add a
lockdep assert to check anyway.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Link: https://lkml.kernel.org/r/29453ee8e820457d87a8faf9d496390e59c6826f.1562073871.git.leonard.crestez@nxp.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Leonard Crestez authored and Stephen Boyd committed Aug 8, 2019
1 parent 1bd37a4 commit 9f77672
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,8 @@ static void clk_core_get_boundaries(struct clk_core *core,
{
struct clk *clk_user;

lockdep_assert_held(&prepare_lock);

*min_rate = core->min_rate;
*max_rate = core->max_rate;

Expand Down

0 comments on commit 9f77672

Please sign in to comment.