Linux-i3c Archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Ruan Jinjie <ruanjinjie@huawei.com>
Cc: <linux-i3c@lists.infradead.org>,
	Conor Culhane <conor.culhane@silvaco.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH -next] i3c: master: svc: Do not check for 0 return after calling platform_get_irq()
Date: Thu, 3 Aug 2023 11:04:08 +0200	[thread overview]
Message-ID: <20230803110408.48bbe8ec@xps-13> (raw)
In-Reply-To: <20230803085149.149248-1-ruanjinjie@huawei.com>

Hi Ruan,

ruanjinjie@huawei.com wrote on Thu, 3 Aug 2023 16:51:49 +0800:

> It is not possible for platform_get_irq() to return 0. Use the
> return value from platform_get_irq().

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>

> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
> ---
>  drivers/i3c/master/svc-i3c-master.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
> index 0d63b732ef0c..770b40e28015 100644
> --- a/drivers/i3c/master/svc-i3c-master.c
> +++ b/drivers/i3c/master/svc-i3c-master.c
> @@ -1518,8 +1518,8 @@ static int svc_i3c_master_probe(struct platform_device *pdev)
>  		return PTR_ERR(master->sclk);
>  
>  	master->irq = platform_get_irq(pdev, 0);
> -	if (master->irq <= 0)
> -		return -ENOENT;
> +	if (master->irq < 0)
> +		return master->irq;
>  
>  	master->dev = dev;
>  


Thanks,
Miquèl

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

  reply	other threads:[~2023-08-03  9:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03  8:51 [PATCH -next] i3c: master: svc: Do not check for 0 return after calling platform_get_irq() Ruan Jinjie
2023-08-03  9:04 ` Miquel Raynal [this message]
2023-08-10  8:13 ` Alexandre Belloni

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=20230803110408.48bbe8ec@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=conor.culhane@silvaco.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=ruanjinjie@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 read-only IMAP folder(s) and NNTP newsgroup(s).