sh: clkfwk: Handle clk_get_sys() returning an ERR_PTR.
clk_get() needs to also perform an IS_ERR() check to see whether
clk_get_sys() failed or not.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c
index 34707b8..9e1fc13 100644
--- a/arch/sh/kernel/cpu/clock.c
+++ b/arch/sh/kernel/cpu/clock.c
@@ -399,7 +399,7 @@
int idno;
clk = clk_get_sys(dev_id, id);
- if (clk)
+ if (clk && !IS_ERR(clk))
return clk;
if (dev == NULL || dev->bus != &platform_bus_type)