aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiro Yamada <[email protected]>2016-09-19 03:04:35 +0900
committerRalf Baechle <[email protected]>2016-10-04 16:13:57 +0200
commit00ca0250125934c8e47f58f973ea2f8905cee017 (patch)
tree538ce0ec85b09a3e7b8d2003a0d53a66182f7266
parent5f92635462d64f09f4643e7c15c48ea7a1f7d2b7 (diff)
MIPS: BCM63xx: 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]> Acked-by: Florian Fainelli <[email protected]> Cc: Stephen Boyd <[email protected]> Cc: Michael Turquette <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/14264/ Signed-off-by: Ralf Baechle <[email protected]>
-rw-r--r--arch/mips/bcm63xx/clk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c
index 637565284732..b49fc9cb9cad 100644
--- a/arch/mips/bcm63xx/clk.c
+++ b/arch/mips/bcm63xx/clk.c
@@ -326,6 +326,9 @@ EXPORT_SYMBOL(clk_enable);
void clk_disable(struct clk *clk)
{
+ if (!clk)
+ return;
+
mutex_lock(&clocks_mutex);
clk_disable_unlocked(clk);
mutex_unlock(&clocks_mutex);