summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/pxafb.c
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2020-05-25 15:11:45 +0800
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2020-06-01 15:15:23 +0200
commitf35b1d6c21b414e960ae3a9f1164fc691e1c3ab2 (patch)
tree5363a860b4c195504d3b3c49a314b5686005ee0e /drivers/video/fbdev/pxafb.c
parent499a2c41b954518c372873202d5e7714e22010c4 (diff)
downloadlinux-f35b1d6c21b414e960ae3a9f1164fc691e1c3ab2.tar.bz2
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
Diffstat (limited to 'drivers/video/fbdev/pxafb.c')
-rw-r--r--drivers/video/fbdev/pxafb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index 6f972bed410a..a53d24fb7183 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -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;
}