clk: Add locking to clk_get_rate_range
authorMaxime Ripard <maxime@cerno.tech>
Fri, 6 May 2022 10:24:31 +0000 (12:24 +0200)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Wed, 11 May 2022 15:33:21 +0000 (16:33 +0100)
clk_get_rate_range() is missing the proper locks, making lockdep
complain.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/clk/clk.c

index f3dfb6b23030bc8ae2a78f3993a49c18e06bf8e4..de6715cd57c00b17d66f7ebc7ea80577653c13a6 100644 (file)
@@ -2589,7 +2589,9 @@ void clk_get_rate_range(struct clk *clk, unsigned long *min, unsigned long *max)
        if (!clk || !min || !max)
                return;
 
+       clk_prepare_lock();
        clk_core_get_boundaries(clk->core, min, max);
+       clk_prepare_unlock();
 }
 EXPORT_SYMBOL_GPL(clk_get_rate_range);