video: fbdev: pxafb: Use correct return value for pxafb_probe()

When call function devm_platform_ioremap_resource(), we should use IS_ERR()
to check the return value and return PTR_ERR() if failed.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Xuefeng Li <lixuefeng@loongson.cn>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1590390705-22898-1-git-send-email-yangtiezhu@loongson.cn
This commit is contained in:
Tiezhu Yang 2020-05-25 15:11:45 +08:00 committed by Bartlomiej Zolnierkiewicz
parent 499a2c41b9
commit f35b1d6c21

View File

@ -2305,7 +2305,7 @@ static int pxafb_probe(struct platform_device *dev)
fbi->mmio_base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(fbi->mmio_base)) {
dev_err(&dev->dev, "failed to get I/O memory\n");
ret = -EBUSY;
ret = PTR_ERR(fbi->mmio_base);
goto failed;
}