Skip to content

Commit

Permalink
m68k: coldfire: return success for clk_enable(NULL)
Browse files Browse the repository at this point in the history
[ Upstream commit f6a4f0b ]

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: c1fb1bf ("m68k: let clk_enable() return immediately if clk is NULL")
Fixes: bea8bcb ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Dan Carpenter authored and gregkh committed Sep 15, 2021
1 parent a181e99 commit 9490301
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/m68k/coldfire/clk.c
Expand Up @@ -78,7 +78,7 @@ int clk_enable(struct clk *clk)
unsigned long flags;

if (!clk)
return -EINVAL;
return 0;

spin_lock_irqsave(&clk_lock, flags);
if ((clk->enabled++ == 0) && clk->clk_ops)
Expand Down

0 comments on commit 9490301

Please sign in to comment.