]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
video: fbdev: pxafb: Use correct return value for pxafb_probe()
authorTiezhu Yang <yangtiezhu@loongson.cn>
Mon, 25 May 2020 07:11:45 +0000 (15:11 +0800)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 1 Jun 2020 13:15:23 +0000 (15:15 +0200)
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
drivers/video/fbdev/pxafb.c

index 6f972bed410a9371ff905d6c63ad3cecada6d752..a53d24fb718345fc286cfac0665f61042639542e 100644 (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;
        }