Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 742859ad authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Greg Ungerer
Browse files

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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
parent 3ec53d6f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -101,6 +101,10 @@ EXPORT_SYMBOL(clk_enable);
void clk_disable(struct clk *clk)
{
	unsigned long flags;

	if (!clk)
		return;

	spin_lock_irqsave(&clk_lock, flags);
	if ((--clk->enabled == 0) && clk->clk_ops)
		clk->clk_ops->disable(clk);