From: Alan Cox Date: Tue, 24 Jul 2012 12:55:10 +0000 (+0100) Subject: gpio-sch: Fix leak of resource X-Git-Tag: firefly_0821_release~3680^2~2230^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8abdd2d2d873ece35a201c2e05af7b6998cf0dca;p=firefly-linux-kernel-4.4.55.git gpio-sch: Fix leak of resource Signed-off-by: Alan Cox Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpio-sch.c b/drivers/gpio/gpio-sch.c index 424dce8e3f30..8707d4572a06 100644 --- a/drivers/gpio/gpio-sch.c +++ b/drivers/gpio/gpio-sch.c @@ -241,7 +241,8 @@ static int __devinit sch_gpio_probe(struct platform_device *pdev) break; default: - return -ENODEV; + err = -ENODEV; + goto err_sch_gpio_core; } sch_gpio_core.dev = &pdev->dev;