Skip to content

Commit 92dfb27

Browse files
Sergey Shtylyovwsakernel
authored andcommitted
i2c: sh7760: fix IRQ error path
While adding the invalid IRQ check after calling platform_get_irq(), I managed to overlook that the driver has a complex error path in its probe() method, thus a simple *return* couldn't be used. Use a proper *goto* instead! Fixes: e5b2e3e ("i2c: sh7760: add IRQ check") Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent 8f51c17 commit 92dfb27

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/i2c/busses/i2c-sh7760.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ static int sh7760_i2c_probe(struct platform_device *pdev)
473473

474474
ret = platform_get_irq(pdev, 0);
475475
if (ret < 0)
476-
return ret;
476+
goto out3;
477477
id->irq = ret;
478478

479479
id->adap.nr = pdev->id;

0 commit comments

Comments
 (0)