diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-26 19:17:11 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-26 19:17:11 +0100 |
commit | a422ce5bb31dc82a52c72f96838e4e5f1dbf7228 (patch) | |
tree | 92a709a6e0fd037a2d30c586b2a254ac41bc6585 /arch/m68k | |
parent | Merge tag 'trace-v5.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ro... (diff) | |
parent | m68k: let clk_enable() return immediately if clk is NULL (diff) | |
download | linux-a422ce5bb31dc82a52c72f96838e4e5f1dbf7228.tar.xz linux-a422ce5bb31dc82a52c72f96838e4e5f1dbf7228.zip |
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); |