Messages in this thread | | | From | Lei YU <> | Date | Fri, 9 Mar 2018 11:23:08 +0800 | Subject | Re: [PATCH v2 2/2] clk: aspeed: Prevent reset if clock is enabled |
| |
> static int aspeed_clk_enable(struct clk_hw *hw) > { > struct aspeed_clk_gate *gate = to_aspeed_clk_gate(hw); > @@ -215,6 +227,11 @@ static int aspeed_clk_enable(struct clk_hw *hw) > > spin_lock_irqsave(gate->lock, flags); > > + if (aspeed_clk_is_enabled(hw)) { > + spin_unlock_irqrestore(gate->lock, flags); > + return 0; > + } > +
I think this piece of code can be run before spin_lock_irqsave(), so it is able to just return without spin_unlock_irqrestore()?
| |