From: Masahiro Yamada Date: Wed, 3 May 2017 21:51:35 +0000 (-0700) Subject: blackfin: bf609: let clk_disable() return immediately if clk is NULL X-Git-Tag: v4.14-rc1~1003^2~99 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=accce8e7e8b769ec2430bc0f4a8a2b23c68c1837;p=platform%2Fkernel%2Flinux-rpi.git 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 Cc: Stephen Boyd Cc: Ralf Baechle Cc: Michael Turquette Cc: Steven Miao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/blackfin/mach-bf609/clock.c b/arch/blackfin/mach-bf609/clock.c index 3783058..392a59b 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); }