From: Pramod Gurav Date: Sat, 30 Aug 2014 11:13:00 +0000 (+0530) Subject: pinctrl: sirf: Remove gpiochip on failure cases X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0a5d667048ab3b22dff3c60561a79310981ee897;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.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++) {