Re: [PATCH v2] gpiolib: Fix irq_domain resource tracking for gpiochip_irqchip_add_domain()

From: Bartosz Golaszewski
Date: Mon Jun 19 2023 - 08:58:31 EST


On Mon, Jun 19, 2023 at 10:56 AM Michael Walle <mwalle@xxxxxxxxxx> wrote:
>
> Up until commit 6a45b0e2589f ("gpiolib: Introduce
> gpiochip_irqchip_add_domain()") all irq_domains were allocated
> by gpiolib itself and thus gpiolib also takes care of freeing it.
>
> With gpiochip_irqchip_add_domain() a user of gpiolib can associate an
> irq_domain with the gpio_chip. This irq_domain is not managed by
> gpiolib and therefore must not be freed by gpiolib.
>
> Fixes: 6a45b0e2589f ("gpiolib: Introduce gpiochip_irqchip_add_domain()")
> Reported-by: Jiawen Wu <jiawenwu@xxxxxxxxxxxxxx>
> Signed-off-by: Michael Walle <mwalle@xxxxxxxxxx>
> Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>
> ---

Applied, thanks!

Bart