diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-26 10:17:11 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-26 10:17:11 -0800 |
commit | a422ce5bb31dc82a52c72f96838e4e5f1dbf7228 (patch) | |
tree | 92a709a6e0fd037a2d30c586b2a254ac41bc6585 /arch/m68k | |
parent | 8b1e2c50bce9f3cc4422c3ed087252b8347da77a (diff) | |
parent | c1fb1bf64bb63a1d6ae3311a9a3581a527c1f185 (diff) |
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
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/coldfire/clk.c | 4 |
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); |