Skip to content

Commit

Permalink
blackfin: bf609: let clk_disable() return immediately if clk is NULL
Browse files Browse the repository at this point in the history
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.

Link: http://lkml.kernel.org/r/[email protected]
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]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
masahir0y authored and torvalds committed May 3, 2017
1 parent 672934d commit accce8e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/blackfin/mach-bf609/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit accce8e

Please sign in to comment.