提交 c5c7502e 编写于 作者: Y Yang Yingliang 提交者: 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: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NHelge Deller <deller@gmx.de>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册