Files
linux/drivers/gpio
Qingshuang Fu 4e8eb6952a gpio: davinci: fix IRQ domain leak on devm_kzalloc failure
In davinci_gpio_irq_setup(), after successfully creating an IRQ domain
with irq_domain_create_legacy(), a subsequent devm_kzalloc() failure
in the bank loop causes the function to return -ENOMEM without
removing the IRQ domain.

Unlike devm-managed resources, irq_domain_create_legacy() does not
auto-clean up on probe failure, so the domain is leaked.

Fix by calling irq_domain_remove() before returning on allocation
failure.

Fixes: b5cf3fd827 ("gpio: davinci: Redesign driver to accommodate ngpios in one gpio chip")
Signed-off-by: Qingshuang Fu <fuqingshuang@kylinos.cn>
Link: https://patch.msgid.link/20260623023106.117229-1-fffsqian@163.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-06-23 10:44:29 +02:00
..
2026-03-31 14:13:14 +01:00
2025-11-25 14:10:07 +01:00
2025-11-25 14:10:06 +01:00
2025-11-25 14:10:07 +01:00
2026-03-16 09:51:05 +01:00