Skip to content
Commit 0357259c authored by Michael Walle's avatar Michael Walle Committed by Greg Kroah-Hartman
Browse files

gpiolib: Fix irq_domain resource tracking for gpiochip_irqchip_add_domain()

[ Upstream commit ff7a1790 ]

Up until commit 6a45b0e2 ("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: 6a45b0e2

 ("gpiolib: Introduce gpiochip_irqchip_add_domain()")
Reported-by: default avatarJiawen Wu <jiawenwu@trustnetic.com>
Signed-off-by: default avatarMichael Walle <mwalle@kernel.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarAndy Shevchenko <andy@kernel.org>
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8592ada8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment