* [PATCH -next] i3c: master: svc: Do not check for 0 return after calling platform_get_irq()
@ 2023-08-03 8:51 Ruan Jinjie
2023-08-03 9:04 ` Miquel Raynal
2023-08-10 8:13 ` Alexandre Belloni
0 siblings, 2 replies; 3+ messages in thread
From: Ruan Jinjie @ 2023-08-03 8:51 UTC (permalink / raw)
To: linux-i3c, Miquel Raynal, Conor Culhane, Alexandre Belloni; +Cc: ruanjinjie
It is not possible for platform_get_irq() to return 0. Use the
return value from platform_get_irq().
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;
--
2.34.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] i3c: master: svc: Do not check for 0 return after calling platform_get_irq()
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
2023-08-10 8:13 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2023-08-03 9:04 UTC (permalink / raw)
To: Ruan Jinjie; +Cc: linux-i3c, Conor Culhane, Alexandre Belloni
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] i3c: master: svc: Do not check for 0 return after calling platform_get_irq()
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
@ 2023-08-10 8:13 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2023-08-10 8:13 UTC (permalink / raw)
To: linux-i3c, Miquel Raynal, Conor Culhane, Ruan Jinjie
On Thu, 03 Aug 2023 16:51:49 +0800, Ruan Jinjie wrote:
> It is not possible for platform_get_irq() to return 0. Use the
> return value from platform_get_irq().
>
>
Applied, thanks!
[1/1] i3c: master: svc: Do not check for 0 return after calling platform_get_irq()
commit: 300098637900f7ff99cafed2be7221407b82df83
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-10 8:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-08-10 8:13 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox