aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-altera.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-02-11 11:25:55 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-02-11 11:25:55 -0800
commitc05235d50f681bf685e7290cae05ab3b4fa493f3 (patch)
tree6004c6e573b5fe0ec98961250dbacf758fb64ce5 /drivers/gpio/gpio-altera.c
parentda2f912aef1106144c43b75f8719807dfad121b3 (diff)
parent6ec9249a83b00a754af435ed57ad02ffed105d93 (diff)
Merge tag 'gpio-v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO fixes from Linus Walleij: - Probe errorpath fix for the Altera - irqchip ofnode pointer added to the DaVinci driver - controller instance number correction for DaVinci * tag 'gpio-v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: davinci: Fix the number of controllers allocated gpio: davinci: Add the missing of-node pointer gpio: gpio-altera: Remove gpiochip on probe failure.
Diffstat (limited to 'drivers/gpio/gpio-altera.c')
-rw-r--r--drivers/gpio/gpio-altera.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c
index 2aeaebd1c6e7..3f87a03abc22 100644
--- a/drivers/gpio/gpio-altera.c
+++ b/drivers/gpio/gpio-altera.c
@@ -312,8 +312,8 @@ static int altera_gpio_probe(struct platform_device *pdev)
handle_simple_irq, IRQ_TYPE_NONE);
if (ret) {
- dev_info(&pdev->dev, "could not add irqchip\n");
- return ret;
+ dev_err(&pdev->dev, "could not add irqchip\n");
+ goto teardown;
}
gpiochip_set_chained_irqchip(&altera_gc->mmchip.gc,
@@ -326,6 +326,7 @@ static int altera_gpio_probe(struct platform_device *pdev)
skip_irq:
return 0;
teardown:
+ of_mm_gpiochip_remove(&altera_gc->mmchip);
pr_err("%s: registration failed with status %d\n",
node->full_name, ret);