From: Helge Deller <deller@gmx.de>
To: Zhu Wang <wangzhu9@huawei.com>,
u.kleine-koenig@pengutronix.de, tzimmermann@suse.de,
sam@ravnborg.org, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH -next] video: fbdev: goldfishfb: Do not check 0 for platform_get_irq()
Date: Tue, 15 Aug 2023 23:17:09 +0200 [thread overview]
Message-ID: <2655ffdd-e799-1bda-2ca5-311406f5312c@gmx.de> (raw)
In-Reply-To: <20230803071006.87235-1-wangzhu9@huawei.com>
On 8/3/23 09:10, Zhu Wang wrote:
> Since platform_get_irq() never returned zero, so it need not to check
> whether it returned zero, and we use the return error code of
> platform_get_irq() to replace the current return error code.
>
> Please refer to the commit a85a6c86c25b ("driver core: platform: Clarify
> that IRQ 0 is invalid") to get that platform_get_irq() never returned
> zero.
>
> Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
applied.
Thanks!
Helge
> ---
> drivers/video/fbdev/goldfishfb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/goldfishfb.c b/drivers/video/fbdev/goldfishfb.c
> index ef2528c3faa9..c3091ce26e5c 100644
> --- a/drivers/video/fbdev/goldfishfb.c
> +++ b/drivers/video/fbdev/goldfishfb.c
> @@ -203,8 +203,8 @@ static int goldfish_fb_probe(struct platform_device *pdev)
> }
>
> fb->irq = platform_get_irq(pdev, 0);
> - if (fb->irq <= 0) {
> - ret = -ENODEV;
> + if (fb->irq < 0) {
> + ret = fb->irq;
> goto err_no_irq;
> }
>
prev parent reply other threads:[~2023-08-15 21:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-03 7:10 [PATCH -next] video: fbdev: goldfishfb: Do not check 0 for platform_get_irq() Zhu Wang
2023-08-15 21:17 ` Helge Deller [this message]
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=2655ffdd-e799-1bda-2ca5-311406f5312c@gmx.de \
--to=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=tzimmermann@suse.de \
--cc=u.kleine-koenig@pengutronix.de \
--cc=wangzhu9@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;
as well as URLs for NNTP newsgroup(s).