Skip to content

Commit accf475

Browse files
Wei Yongjunbebarino
authored andcommitted
clk: aspeed: Fix return value check in aspeed_cc_init()
In case of error, the function of_iomap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: a2e230c7b2ea ("clk: Add clock driver for ASPEED BMC SoCs") Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent f798983 commit accf475

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/clk-aspeed.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ static void __init aspeed_cc_init(struct device_node *np)
609609
int i;
610610

611611
scu_base = of_iomap(np, 0);
612-
if (IS_ERR(scu_base))
612+
if (!scu_base)
613613
return;
614614

615615
aspeed_clk_data = kzalloc(sizeof(*aspeed_clk_data) +

0 commit comments

Comments
 (0)