Commit c5c7502e authored by Yang Yingliang's avatar Yang Yingliang Committed by Helge Deller

video: fbdev: imxfb: fix return value check in imxfb_probe()

If devm_ioremap_resource() fails, it never return NULL, replace
NULL test with IS_ERR().

Fixes: b083c22d ("video: fbdev: imxfb: Convert request_mem_region + ioremap to devm_ioremap_resource")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 3eb8fccc
......@@ -971,9 +971,9 @@ static int imxfb_probe(struct platform_device *pdev)
}
fbi->regs = devm_ioremap_resource(&pdev->dev, res);
if (fbi->regs == NULL) {
if (IS_ERR(fbi->regs)) {
dev_err(&pdev->dev, "Cannot map frame buffer registers\n");
ret = -ENOMEM;
ret = PTR_ERR(fbi->regs);
goto failed_ioremap;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment