From: Sergey Shtylyov Date: Sat, 17 Apr 2021 19:05:05 +0000 (+0300) Subject: i2c: sh7760: fix IRQ error path X-Git-Tag: accepted/tizen/unified/20230118.172025~7326^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92dfb27240fea2776f61c5422472cb6defca7767;p=platform%2Fkernel%2Flinux-rpi.git 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: e5b2e3e74201 ("i2c: sh7760: add IRQ check") Signed-off-by: Sergey Shtylyov Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c index c79c9f5..319d1fa 100644 --- a/drivers/i2c/busses/i2c-sh7760.c +++ b/drivers/i2c/busses/i2c-sh7760.c @@ -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;