Skip to content

Commit 661e8a8

Browse files
Sergey Shtylyovwsakernel
authored andcommitted
i2c: xlp9xx: fix main IRQ check
Iff platform_get_irq() returns 0 for the main IRQ, the driver's probe() method will return 0 early (as if the method's call was successful). Let's consider IRQ0 valid for simplicity -- devm_request_irq() can always override that decision... Fixes: 2bbd681 ("i2c: xlp9xx: Driver for Netlogic XLP9XX/5XX I2C controller") Signed-off-by: Sergey Shtylyov <[email protected]> Reviewed-by: George Cherian <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 58fb7c6 commit 661e8a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-xlp9xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ static int xlp9xx_i2c_probe(struct platform_device *pdev)
517517
return PTR_ERR(priv->base);
518518

519519
priv->irq = platform_get_irq(pdev, 0);
520-
if (priv->irq <= 0)
520+
if (priv->irq < 0)
521521
return priv->irq;
522522
/* SMBAlert irq */
523523
priv->alert_data.irq = platform_get_irq(pdev, 1);

0 commit comments

Comments
 (0)