blackfin: bf609: let clk_disable() return immediately if clk is NULL
PATCH 3/102 blackfin: bf609: let clk_disable() return immediately if clk is NULL
From: Masahiro Yamada <[email protected]>
Subject: blackfin: bf609: 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 <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Ralf Baechle <[email protected]>
Cc Michael Turquette <[email protected]>
Cc Steven Miao <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
arch/blackfin/mach-bf609/clock.c | 3 +++ 1 file changed, 3 insertions(+)
arch/blackfin/mach-bf609/clock.c renamed from arch/blackfin/mach-bf609/clock.c~blackfin-bf609-let-clk_disable-return-immediately-if-clk-is-null +3 -0
@@ -97,6 +97,9 @@ EXPORT_SYMBOL(clk_enable);void clk_disable (struct clk *clk) { +if (!clk) +return ; +if (clk->ops && clk->ops->disable) clk->ops->disable (clk); }
_