pinctrl: sirf: Remove gpiochip on failure cases
authorPramod Gurav <pramod.gurav@smartplayin.com>
Sat, 30 Aug 2014 11:13:00 +0000 (16:43 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 4 Sep 2014 16:46:39 +0000 (18:46 +0200)
This patch releases gpiochip related resources by calling
gpiochip_remove when gpiochip_irqchip_add fails.

CC: Linus Walleij <linus.walleij@linaro.org>
CC: Barry Song <Baohua.Song@csr.com>
CC: Rongjun Ying <rongjun.ying@csr.com>
CC: Yuping Luo <yuping.luo@csr.com>
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sirf/pinctrl-sirf.c

index 6f252fd7cb0c795e66aff1716d9f2d8a6543c0e1..b713bd59ffbb8f11b5283bff796c8e239e1a8f2d 100644 (file)
@@ -853,7 +853,7 @@ static int sirfsoc_gpio_probe(struct device_node *np)
        if (err) {
                dev_err(&pdev->dev,
                        "could not connect irqchip to gpiochip\n");
-               goto out;
+               goto out_banks;
        }
 
        for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) {