Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

m68k: coldfire: return success for clk_enable(NULL)

The clk_enable is supposed work when CONFIG_HAVE_CLK is false, but it
returns -EINVAL. That means some drivers fail during probe.

[ 1.680000] flexcan: probe of flexcan.0 failed with error -22

Fixes: c1fb1bf64bb6 ("m68k: let clk_enable() return immediately if clk is NULL")
Fixes: bea8bcb12da0 ("m68knommu: Add support for the Coldfire m5441x.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>

authored by

Dan Carpenter and committed by
Greg Ungerer
f6a4f0b4 35a9f936

+1 -1
+1 -1
arch/m68k/coldfire/clk.c
··· 78 78 unsigned long flags; 79 79 80 80 if (!clk) 81 - return -EINVAL; 81 + return 0; 82 82 83 83 spin_lock_irqsave(&clk_lock, flags); 84 84 if ((clk->enabled++ == 0) && clk->clk_ops)