From: Pramod Gurav Date: Sat, 30 Aug 2014 11:13:00 +0000 (+0530) Subject: pinctrl: sirf: Remove gpiochip on failure cases X-Git-Tag: firefly_0821_release~176^2~3139^2~25 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0a5d667048ab3b22dff3c60561a79310981ee897;p=firefly-linux-kernel-4.4.55.git pinctrl: sirf: Remove gpiochip on failure cases This patch releases gpiochip related resources by calling gpiochip_remove when gpiochip_irqchip_add fails. CC: Linus Walleij CC: Barry Song CC: Rongjun Ying CC: Yuping Luo Signed-off-by: Pramod Gurav Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c b/drivers/pinctrl/sirf/pinctrl-sirf.c index 6f252fd7cb0c..b713bd59ffbb 100644 --- a/drivers/pinctrl/sirf/pinctrl-sirf.c +++ b/drivers/pinctrl/sirf/pinctrl-sirf.c @@ -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++) {