forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
0dae89572c
commit
f3f8290cb3
@ -399,7 +399,7 @@ struct clk *clk_get(struct device *dev, const char *id)
|
|||||||
int idno;
|
int idno;
|
||||||
|
|
||||||
clk = clk_get_sys(dev_id, id);
|
clk = clk_get_sys(dev_id, id);
|
||||||
if (clk)
|
if (clk && !IS_ERR(clk))
|
||||||
return clk;
|
return clk;
|
||||||
|
|
||||||
if (dev == NULL || dev->bus != &platform_bus_type)
|
if (dev == NULL || dev->bus != &platform_bus_type)
|
||||||
|
Loading…
Reference in New Issue
Block a user