Skip to content

Commit f3f8290

Browse files
committed
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>
1 parent 0dae895 commit f3f8290

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/sh/kernel/cpu/clock.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ struct clk *clk_get(struct device *dev, const char *id)
399399
int idno;
400400

401401
clk = clk_get_sys(dev_id, id);
402-
if (clk)
402+
if (clk && !IS_ERR(clk))
403403
return clk;
404404

405405
if (dev == NULL || dev->bus != &platform_bus_type)

0 commit comments

Comments
 (0)