1
0
Fork 0

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>
hifive-unleashed-5.1
Bartosz Golaszewski 2017-03-04 17:23:30 +01:00 committed by Linus Walleij
parent 62a7ca0735
commit 9bc81137e8
1 changed files with 2 additions and 1 deletions

View File

@ -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;