From: Helge Deller <deller@gmx.de>
To: Yang Yingliang <yangyingliang@huawei.com>,
linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org
Cc: u.kleine-koenig@pengutronix.de
Subject: Re: [PATCH -next] video: fbdev: imxfb: fix return value check in imxfb_probe()
Date: Fri, 29 Jul 2022 22:59:52 +0200 [thread overview]
Message-ID: <c23d058a-4dc0-3877-083a-2476ba4e1714@gmx.de> (raw)
In-Reply-To: <20220729024134.159942-1-yangyingliang@huawei.com>
On 7/29/22 04:41, Yang Yingliang wrote:
> If devm_ioremap_resource() fails, it never return NULL, replace
> NULL test with IS_ERR().
>
> Fixes: b083c22d5114 ("video: fbdev: imxfb: Convert request_mem_region + ioremap to devm_ioremap_resource")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
applied to fbdev git tree.
Thanks!
Helge
> ---
> drivers/video/fbdev/imxfb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
> index c48477893dd0..d97d7456d15a 100644
> --- a/drivers/video/fbdev/imxfb.c
> +++ b/drivers/video/fbdev/imxfb.c
> @@ -971,9 +971,9 @@ static int imxfb_probe(struct platform_device *pdev)
> }
>
> fbi->regs = devm_ioremap_resource(&pdev->dev, res);
> - if (fbi->regs == NULL) {
> + if (IS_ERR(fbi->regs)) {
> dev_err(&pdev->dev, "Cannot map frame buffer registers\n");
> - ret = -ENOMEM;
> + ret = PTR_ERR(fbi->regs);
> goto failed_ioremap;
> }
>
next prev parent reply other threads:[~2022-07-29 21:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-29 2:41 Yang Yingliang
2022-07-29 20:59 ` Helge Deller [this message]
2022-07-30 23:18 ` Uwe Kleine-König
2022-08-01 2:43 ` Yang Yingliang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c23d058a-4dc0-3877-083a-2476ba4e1714@gmx.de \
--to=deller@gmx.de \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=yangyingliang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®