summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-09-01 22:55:42 +0100
committerMark Brown <broonie@kernel.org>2026-09-01 23:48:33 +0100
commit2e42cade8ff1ff579e77976d9869db4df1feaf74 (patch)
tree935753fd08fe72cc14c34f62711ca200b9447cf5 /drivers
parentcee9395acd8043be0644b25c34bfa86623f2b935 (diff)
downloadlinux-next-2e42cade8ff1ff579e77976d9869db4df1feaf74.tar.gz
linux-next-2e42cade8ff1ff579e77976d9869db4df1feaf74.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/regmap/regmap-irq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 99b55b1053ee..715eb9e7aa2a 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -963,7 +963,7 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode,
return 0;
err_domain:
- /* Should really dispose of the domain but... */
+ irq_domain_remove(d->domain);
err_mutex:
mutex_destroy(&d->lock);
lockdep_unregister_key(&d->lock_key);