diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index c81803b9ba3578c6d6f6da657e09534bbb6d26e4..8149764f8438fd456b18ff1cba8107d2fe48173a 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -900,6 +900,11 @@ int clk_set_rate(struct clk *clk, unsigned long rate) if (rate == clk->rate) goto out; + if ((clk->flags & CLK_SET_RATE_GATE) && __clk_is_enabled(clk)) { + ret = -EBUSY; + goto out; + } + /* calculate new rates and get the topmost changed clock */ top = clk_calc_new_rates(clk, rate); if (!top) {