mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
ARM: mmp: 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: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
e1ffaa551c
commit
aa9daa310d
1 changed files with 3 additions and 0 deletions
|
@ -67,6 +67,9 @@ void clk_disable(struct clk *clk)
|
|||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (!clk)
|
||||
return;
|
||||
|
||||
WARN_ON(clk->enabled == 0);
|
||||
|
||||
spin_lock_irqsave(&clocks_lock, flags);
|
||||
|
|
Loading…
Reference in a new issue