diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2017-03-04 17:23:30 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-03-15 11:16:32 +0100 |
commit | 9bc81137e8082eaa73f1b116e1df2c75673d64df (patch) | |
tree | 5d028d00f92d58aa6998240c05e7f5a77b885e04 /drivers/gpio/gpio-twl4030.c | |
parent | 62a7ca0735f47e5799a892daab39be3c67979de9 (diff) | |
download | lwn-9bc81137e8082eaa73f1b116e1df2c75673d64df.tar.gz lwn-9bc81137e8082eaa73f1b116e1df2c75673d64df.zip |
gpio: twl4030: use devm_irq_alloc_descs()
This driver never frees the irq descriptors it allocates. Fix it by
using a resource managed variant of irq_alloc_descs().
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-twl4030.c')
-rw-r--r-- | drivers/gpio/gpio-twl4030.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-twl4030.c b/drivers/gpio/gpio-twl4030.c index dfcfbba74416..24f388ed46d4 100644 --- a/drivers/gpio/gpio-twl4030.c +++ b/drivers/gpio/gpio-twl4030.c @@ -485,7 +485,8 @@ static int gpio_twl4030_probe(struct platform_device *pdev) goto no_irqs; } - irq_base = irq_alloc_descs(-1, 0, TWL4030_GPIO_MAX, 0); + irq_base = devm_irq_alloc_descs(&pdev->dev, -1, + 0, TWL4030_GPIO_MAX, 0); if (irq_base < 0) { dev_err(&pdev->dev, "Failed to alloc irq_descs\n"); return irq_base; |