提交 e1ffaa55 编写于 作者: M Masahiro Yamada 提交者: Arnd Bergmann

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: NMasahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: NWan Zongshun <mcuos.com@gmail.com>
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
上级 01527908
...@@ -46,6 +46,9 @@ void clk_disable(struct clk *clk) ...@@ -46,6 +46,9 @@ void clk_disable(struct clk *clk)
{ {
unsigned long flags; unsigned long flags;
if (!clk)
return;
WARN_ON(clk->enabled == 0); WARN_ON(clk->enabled == 0);
spin_lock_irqsave(&clocks_lock, flags); spin_lock_irqsave(&clocks_lock, flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册