]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sh: clkfwk: Handle clk_get_sys() returning an ERR_PTR.
authorPaul Mundt <lethal@linux-sh.org>
Tue, 12 May 2009 07:07:40 +0000 (16:07 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 12 May 2009 07:07:40 +0000 (16:07 +0900)
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>
arch/sh/kernel/cpu/clock.c

index 34707b867760832fe791e0436bc501c1902d4a18..9e1fc133a4732318615fc542f1804cd1e8157620 100644 (file)
@@ -399,7 +399,7 @@ struct clk *clk_get(struct device *dev, const char *id)
        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)