]> Git Repo - linux.git/commitdiff
i3c: master: svc: Do not check for 0 return after calling platform_get_irq()
authorRuan Jinjie <[email protected]>
Thu, 3 Aug 2023 08:51:49 +0000 (16:51 +0800)
committerAlexandre Belloni <[email protected]>
Thu, 10 Aug 2023 08:12:48 +0000 (10:12 +0200)
It is not possible for platform_get_irq() to return 0. Use the
return value from platform_get_irq().

Signed-off-by: Ruan Jinjie <[email protected]>
Reviewed-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected]>
drivers/i3c/master/svc-i3c-master.c

index 0d63b732ef0c82d076164c15ff455bd8e0fdeb54..770b40e28015e67566dbb4b421ee3bdf94661c94 100644 (file)
@@ -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;
 
This page took 0.058483 seconds and 4 git commands to generate.