提交 accf475a 编写于 作者: W Wei Yongjun 提交者: Stephen Boyd

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: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
上级 f7989839
...@@ -609,7 +609,7 @@ static void __init aspeed_cc_init(struct device_node *np) ...@@ -609,7 +609,7 @@ static void __init aspeed_cc_init(struct device_node *np)
int i; int i;
scu_base = of_iomap(np, 0); scu_base = of_iomap(np, 0);
if (IS_ERR(scu_base)) if (!scu_base)
return; return;
aspeed_clk_data = kzalloc(sizeof(*aspeed_clk_data) + aspeed_clk_data = kzalloc(sizeof(*aspeed_clk_data) +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册