mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 23:24:11 +08:00
irqchip/mchp-eic: Fix return value check in mchp_eic_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. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20211025050055.1129845-1-yangyingliang@huawei.com
This commit is contained in:
parent
00fa3461c8
commit
68a6e0c63c
@ -209,7 +209,7 @@ static int mchp_eic_init(struct device_node *node, struct device_node *parent)
|
||||
return -ENOMEM;
|
||||
|
||||
eic->base = of_iomap(node, 0);
|
||||
if (IS_ERR(eic->base)) {
|
||||
if (!eic->base) {
|
||||
ret = -ENOMEM;
|
||||
goto free;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user