Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: w90x900: 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>
Acked-by: Wan Zongshun <mcuos.com@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Masahiro Yamada and committed by
Arnd Bergmann
e1ffaa55 01527908

+3
+3
arch/arm/mach-w90x900/clock.c
··· 46 46 { 47 47 unsigned long flags; 48 48 49 + if (!clk) 50 + return; 51 + 49 52 WARN_ON(clk->enabled == 0); 50 53 51 54 spin_lock_irqsave(&clocks_lock, flags);