diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-05-03 23:51:35 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-04 00:52:07 +0200 |
commit | accce8e7e8b769ec2430bc0f4a8a2b23c68c1837 (patch) | |
tree | 533773e21a90290778002c621fc6459cdc5b7403 /arch/blackfin/mach-bf609/clock.c | |
parent | scripts/spelling.txt: add several more common spelling mistakes (diff) | |
download | linux-accce8e7e8b769ec2430bc0f4a8a2b23c68c1837.tar.xz linux-accce8e7e8b769ec2430bc0f4a8a2b23c68c1837.zip |
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.
Link: http://lkml.kernel.org/r/1490692624-11931-4-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Steven Miao <realmz6@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/blackfin/mach-bf609/clock.c')
-rw-r--r-- | arch/blackfin/mach-bf609/clock.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf609/clock.c b/arch/blackfin/mach-bf609/clock.c index 378305844b2c..392a59b9a504 100644 --- a/arch/blackfin/mach-bf609/clock.c +++ b/arch/blackfin/mach-bf609/clock.c @@ -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); } |