Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 892d74eb authored by Sergey Shtylyov's avatar Sergey Shtylyov Committed by Greg Kroah-Hartman
Browse files

i2c: sh7760: fix IRQ error path



[ Upstream commit 92dfb27240fea2776f61c5422472cb6defca7767 ]

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: e5b2e3e74201 ("i2c: sh7760: add IRQ check")
Signed-off-by: default avatarSergey Shtylyov <s.shtylyov@omprussia.ru>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d3a3e6ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -473,7 +473,7 @@ static int sh7760_i2c_probe(struct platform_device *pdev)

	ret = platform_get_irq(pdev, 0);
	if (ret < 0)
		return ret;
		goto out3;
	id->irq = ret;

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