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 424dce8..8707d45 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;