Skip to content

Commit 58fb7c6

Browse files
Sergey Shtylyovwsakernel
authored andcommitted
i2c: mt65xx: fix IRQ check
Iff platform_get_irq() returns 0, 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: ce38815 ("I2C: mediatek: Add driver for MediaTek I2C controller") Signed-off-by: Sergey Shtylyov <[email protected]> Reviewed-by: Qii Wang <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 3cfc883 commit 58fb7c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-mt65xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ static int mtk_i2c_probe(struct platform_device *pdev)
12111211
return PTR_ERR(i2c->pdmabase);
12121212

12131213
irq = platform_get_irq(pdev, 0);
1214-
if (irq <= 0)
1214+
if (irq < 0)
12151215
return irq;
12161216

12171217
init_completion(&i2c->msg_complete);

0 commit comments

Comments
 (0)