Переглянути джерело

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>
Masahiro Yamada 8 роки тому
батько
коміт
e1ffaa551c
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      arch/arm/mach-w90x900/clock.c

+ 3 - 0
arch/arm/mach-w90x900/clock.c

@@ -46,6 +46,9 @@ void clk_disable(struct clk *clk)
 {
 	unsigned long flags;
 
+	if (!clk)
+		return;
+
 	WARN_ON(clk->enabled == 0);
 
 	spin_lock_irqsave(&clocks_lock, flags);