From: Tiezhu Yang Date: Mon, 25 May 2020 07:11:45 +0000 (+0800) Subject: video: fbdev: pxafb: Use correct return value for pxafb_probe() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f35b1d6c21b414e960ae3a9f1164fc691e1c3ab2;p=linux.git 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 Cc: Xuefeng Li Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/1590390705-22898-1-git-send-email-yangtiezhu@loongson.cn --- diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index 6f972bed410a9..a53d24fb71834 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; }