mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-12 04:19:08 +00:00
m68k: let clk_disable() return immediately if clk is NULL
In many of clk_disable() implementations, it is a no-op for a NULL pointer input, but this is one of the exceptions. Making it treewide consistent will allow clock consumers to call clk_disable() without NULL pointer check. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
This commit is contained in:
parent
3ec53d6fce
commit
742859adc7
@ -101,6 +101,10 @@ EXPORT_SYMBOL(clk_enable);
|
|||||||
void clk_disable(struct clk *clk)
|
void clk_disable(struct clk *clk)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
|
if (!clk)
|
||||||
|
return;
|
||||||
|
|
||||||
spin_lock_irqsave(&clk_lock, flags);
|
spin_lock_irqsave(&clk_lock, flags);
|
||||||
if ((--clk->enabled == 0) && clk->clk_ops)
|
if ((--clk->enabled == 0) && clk->clk_ops)
|
||||||
clk->clk_ops->disable(clk);
|
clk->clk_ops->disable(clk);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user