diff options
Diffstat (limited to 'drivers/gpio/gpio-tegra.c')
-rw-r--r-- | drivers/gpio/gpio-tegra.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index cfd3b9037bc7..2b49f878b56c 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c | |||
@@ -425,6 +425,7 @@ static int tegra_gpio_probe(struct platform_device *pdev) | |||
425 | struct tegra_gpio_soc_config *config; | 425 | struct tegra_gpio_soc_config *config; |
426 | struct resource *res; | 426 | struct resource *res; |
427 | struct tegra_gpio_bank *bank; | 427 | struct tegra_gpio_bank *bank; |
428 | int ret; | ||
428 | int gpio; | 429 | int gpio; |
429 | int i; | 430 | int i; |
430 | int j; | 431 | int j; |
@@ -494,7 +495,11 @@ static int tegra_gpio_probe(struct platform_device *pdev) | |||
494 | 495 | ||
495 | tegra_gpio_chip.of_node = pdev->dev.of_node; | 496 | tegra_gpio_chip.of_node = pdev->dev.of_node; |
496 | 497 | ||
497 | gpiochip_add(&tegra_gpio_chip); | 498 | ret = gpiochip_add(&tegra_gpio_chip); |
499 | if (ret < 0) { | ||
500 | irq_domain_remove(irq_domain); | ||
501 | return ret; | ||
502 | } | ||
498 | 503 | ||
499 | for (gpio = 0; gpio < tegra_gpio_chip.ngpio; gpio++) { | 504 | for (gpio = 0; gpio < tegra_gpio_chip.ngpio; gpio++) { |
500 | int irq = irq_create_mapping(irq_domain, gpio); | 505 | int irq = irq_create_mapping(irq_domain, gpio); |