public inbox for linux-i3c@lists.infradead.org
 help / color / mirror / Atom feed
* [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

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