From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bartlomiej Zolnierkiewicz Date: Mon, 01 Jun 2020 13:25:25 +0000 Subject: Re: [PATCH] video: fbdev: pxafb: Use correct return value for pxafb_probe() Message-Id: List-Id: References: <1590390705-22898-1-git-send-email-yangtiezhu@loongson.cn> In-Reply-To: <1590390705-22898-1-git-send-email-yangtiezhu@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Tiezhu Yang Cc: linux-fbdev@vger.kernel.org, Xuefeng Li , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org On 5/25/20 9:11 AM, Tiezhu Yang wrote: > 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 Applied to drm-misc-next tree (patch should show up in v5.9), thanks. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics > --- > drivers/video/fbdev/pxafb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c > index 00b96a7..423331c 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; > } > >