mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
i2c: sh7760: fix IRQ error path
[ Upstream commit92dfb27240] 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:e5b2e3e742("i2c: sh7760: add IRQ check") Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru> Signed-off-by: Wolfram Sang <wsa@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d204db4fe6
commit
232598e99f
|
|
@ -473,7 +473,7 @@ static int sh7760_i2c_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
ret = platform_get_irq(pdev, 0);
|
ret = platform_get_irq(pdev, 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
goto out3;
|
||||||
id->irq = ret;
|
id->irq = ret;
|
||||||
|
|
||||||
id->adap.nr = pdev->id;
|
id->adap.nr = pdev->id;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user