[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <511F34C3.6020406@asianux.com>
Date: Sat, 16 Feb 2013 15:26:59 +0800
From: Chen Gang <gang.chen@...anux.com>
To: Peter Ujfalusi <peter.ujfalusi@...com>, grant.likely@...retlab.ca,
linus.walleij@...aro.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: Tony Lindgren <tony@...mide.com>
Subject: [PATCH] drivers/gpio/*twl* need call irq_free_descs when leaving
since already call irq_alloc_descs before,
we need call irq_free_descs when quiting, or resource leak.
Signed-off-by: Chen Gang <gang.chen@...anux.com>
---
drivers/gpio/gpio-twl4030.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/gpio/gpio-twl4030.c b/drivers/gpio/gpio-twl4030.c
index 4d330e3..26aef72 100644
--- a/drivers/gpio/gpio-twl4030.c
+++ b/drivers/gpio/gpio-twl4030.c
@@ -486,8 +486,10 @@ static int gpio_twl4030_probe(struct platform_device *pdev)
&irq_domain_simple_ops, NULL);
ret = twl4030_sih_setup(&pdev->dev, TWL4030_MODULE_GPIO, irq_base);
- if (ret < 0)
+ if (ret < 0) {
+ irq_free_descs(irq_base, TWL4030_GPIO_MAX);
return ret;
+ }
priv->irq_base = irq_base;
@@ -578,6 +580,7 @@ static int gpio_twl4030_remove(struct platform_device *pdev)
/* REVISIT no support yet for deregistering all the IRQs */
WARN_ON(1);
+ irq_free_descs(priv->irq_base, TWL4030_GPIO_MAX);
return -EIO;
}
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists