summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-02-26 10:17:11 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2021-02-26 10:17:11 -0800
commita422ce5bb31dc82a52c72f96838e4e5f1dbf7228 (patch)
tree92a709a6e0fd037a2d30c586b2a254ac41bc6585
parent8b1e2c50bce9f3cc4422c3ed087252b8347da77a (diff)
parentc1fb1bf64bb63a1d6ae3311a9a3581a527c1f185 (diff)
downloadlinux-a422ce5bb31dc82a52c72f96838e4e5f1dbf7228.tar.bz2
Merge tag 'm68knommu-for-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu update from Greg Ungerer: "Only a single change. NULL parameter check in the local ColdFire clocking code" * tag 'm68knommu-for-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: let clk_enable() return immediately if clk is NULL
-rw-r--r--arch/m68k/coldfire/clk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/m68k/coldfire/clk.c b/arch/m68k/coldfire/clk.c
index 7bc666e482eb..076a9caa9557 100644
--- a/arch/m68k/coldfire/clk.c
+++ b/arch/m68k/coldfire/clk.c
@@ -90,6 +90,10 @@ EXPORT_SYMBOL(clk_get);
int clk_enable(struct clk *clk)
{
unsigned long flags;
+
+ if (!clk)
+ return -EINVAL;
+
spin_lock_irqsave(&clk_lock, flags);
if ((clk->enabled++ == 0) && clk->clk_ops)
clk->clk_ops->enable(clk);