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 <[email protected]>
CC: Barry Song <[email protected]>
CC: Rongjun Ying <[email protected]>
CC: Yuping Luo <[email protected]>
Signed-off-by: Pramod Gurav <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
Pramod Gurav 2014-08-30 16:43:00 +05:30 • committed by Linus Walleij
commit 0a5d667048

View 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++) {