Skip to content

Commit

Permalink
sh: clkfwk: Handle clk_get_sys() returning an ERR_PTR.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed May 12, 2009
1 parent 0dae895 commit f3f8290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/kernel/cpu/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f3f8290

Please sign in to comment.