Compare
afb1ecfeda3fc31d6300a176f4854cc62e289bf3..2e42cade8ff1ff579e77976d9869db4df1feaf74
regmap: irq: Free the irqdomain we create
When domain support was added to regmap-irq it was not possible to remove domains, this was added later by 8ee99ada293b (irqdomain: Support removal of IRQ domains.). We did update the main removal path to free the domain but forgot the error unwinding case during creation that is now in regmap_add_irq_chip_fwnode() after some code motion, meaning that errors during instantiation result in an unused irqchip being left hanging around. Add the missing irq_remove_domain() call where the comment says it should be. Reported-by: Farhad Alemi <farhad.alemi@berkeley.edu> Reported-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260901-regmap-irq-deallocate-domain-v1-1-4bfed4aff559@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown <broonie@kernel.org> · 2026-09-01 21:55 UTC
2 files changed,
+3
−3
modified arch/arm/configs/sama5_defconfig
| @@ -69,8 +69,8 @@ CONFIG_BLK_DEV_SD=y | |||
| 69 | 69 | # CONFIG_BLK_DEV_BSG is not set | |
| 70 | 70 | # CONFIG_SCSI_LOWLEVEL is not set | |
| 71 | 71 | CONFIG_NETDEVICES=y | |
| 72 | - | CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON=m | |
| 73 | - | CONFIG_NET_DSA_MICROCHIP_KSZ_SPI=m | |
| 72 | + | CONFIG_NET_DSA_MICROCHIP_KSZ9477=m | |
| 73 | + | CONFIG_NET_DSA_MICROCHIP_KSZ9477_SPI=m | |
| 74 | 74 | # CONFIG_NET_VENDOR_BROADCOM is not set | |
| 75 | 75 | CONFIG_MACB=y | |
| 76 | 76 | # CONFIG_NET_VENDOR_CIRRUS is not set | |
modified drivers/base/regmap/regmap-irq.c
| @@ -963,7 +963,7 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode, | |||
| 963 | 963 | return 0; | |
| 964 | 964 | ||
| 965 | 965 | err_domain: | |
| 966 | - | /* Should really dispose of the domain but... */ | |
| 966 | + | irq_domain_remove(d->domain); | |
| 967 | 967 | err_mutex: | |
| 968 | 968 | mutex_destroy(&d->lock); | |
| 969 | 969 | lockdep_unregister_key(&d->lock_key); | |