Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bartosz Golaszewski and committed by
Linus Walleij
9bc81137 62a7ca07

+2 -1
+2 -1
drivers/gpio/gpio-twl4030.c
··· 485 485 goto no_irqs; 486 486 } 487 487 488 - irq_base = irq_alloc_descs(-1, 0, TWL4030_GPIO_MAX, 0); 488 + irq_base = devm_irq_alloc_descs(&pdev->dev, -1, 489 + 0, TWL4030_GPIO_MAX, 0); 489 490 if (irq_base < 0) { 490 491 dev_err(&pdev->dev, "Failed to alloc irq_descs\n"); 491 492 return irq_base;