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>
This commit is contained in:
Dan Carpenter 2021-07-29 15:27:03 +03:00 committed by Greg Ungerer
parent 35a9f9363a
commit f6a4f0b424

View File

@ -78,7 +78,7 @@ int clk_enable(struct clk *clk)
unsigned long flags; unsigned long flags;
if (!clk) if (!clk)
return -EINVAL; return 0;
spin_lock_irqsave(&clk_lock, flags); spin_lock_irqsave(&clk_lock, flags);
if ((clk->enabled++ == 0) && clk->clk_ops) if ((clk->enabled++ == 0) && clk->clk_ops)