提交 7bdeb7f5 编写于 作者: W Wei Yongjun 提交者: Marc Zyngier

irqchip/aspeed-i2c-ic: Fix return value check in aspeed_i2c_ic_of_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..
Reviewed-by: NBrendan Higgins <brendanhiggins@google.com>
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
上级 215f4cc0
...@@ -76,8 +76,8 @@ static int __init aspeed_i2c_ic_of_init(struct device_node *node, ...@@ -76,8 +76,8 @@ static int __init aspeed_i2c_ic_of_init(struct device_node *node,
return -ENOMEM; return -ENOMEM;
i2c_ic->base = of_iomap(node, 0); i2c_ic->base = of_iomap(node, 0);
if (IS_ERR(i2c_ic->base)) { if (!i2c_ic->base) {
ret = PTR_ERR(i2c_ic->base); ret = -ENOMEM;
goto err_free_ic; goto err_free_ic;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册