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: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
This commit is contained in:
Wei Yongjun 2017-10-11 10:50:23 +00:00 коммит произвёл Marc Zyngier
Родитель 215f4cc0fb
Коммит 7bdeb7f52b
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -76,8 +76,8 @@ static int __init aspeed_i2c_ic_of_init(struct device_node *node,
return -ENOMEM;
i2c_ic->base = of_iomap(node, 0);
if (IS_ERR(i2c_ic->base)) {
ret = PTR_ERR(i2c_ic->base);
if (!i2c_ic->base) {
ret = -ENOMEM;
goto err_free_ic;
}