diff options
author | Ruan Jinjie <ruanjinjie@huawei.com> | 2023-08-03 16:51:49 +0800 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2023-08-10 10:12:48 +0200 |
commit | 300098637900f7ff99cafed2be7221407b82df83 (patch) | |
tree | 92fc03fb8670851314a835124b79889def17344c /drivers/i3c | |
parent | cbf871e6d8ce23dd4d458d8b7ab9d4a267e7bc03 (diff) |
i3c: master: svc: Do not check for 0 return after calling platform_get_irq()
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>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230803085149.149248-1-ruanjinjie@huawei.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/i3c')
-rw-r--r-- | drivers/i3c/master/svc-i3c-master.c | 4 |
1 files 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; |