gpio-sch: Fix leak of resource
authorAlan Cox <alan@linux.intel.com>
Tue, 24 Jul 2012 12:55:10 +0000 (13:55 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Sat, 4 Aug 2012 22:33:48 +0000 (00:33 +0200)
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-sch.c

index 424dce8e3f30107ce2e9b5eb9b5d2bb394164cf9..8707d4572a06bfee4713fab5b521cd58f220aefa 100644 (file)
@@ -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;