Skip to content

Commit f9b459c

Browse files
Sergey Shtylyovwsakernel
authored andcommitted
i2c: hix5hd2: 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: 15ef277 ("i2c: hix5hd2: add i2c controller driver") Signed-off-by: Sergey Shtylyov <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent d6840a5 commit f9b459c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-hix5hd2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ static int hix5hd2_i2c_probe(struct platform_device *pdev)
413413
return PTR_ERR(priv->regs);
414414

415415
irq = platform_get_irq(pdev, 0);
416-
if (irq <= 0)
416+
if (irq < 0)
417417
return irq;
418418

419419
priv->clk = devm_clk_get(&pdev->dev, NULL);

0 commit comments

Comments
 (0)