Skip to content

Commit edfc23f

Browse files
Zenghui YuMarc Zyngier
authored andcommitted
irqchip/mbigen: Free msi_desc on device teardown
Using irq_domain_free_irqs_common() on the irqdomain free path will leave the MSI descriptor unfreed when platform devices get removed. Properly free it by MSI domain free function. Fixes: 9650c60 ("irqchip/mbigen: Create irq domain for each mbigen device") Signed-off-by: Zenghui Yu <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8f3d9f3 commit edfc23f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/irqchip/irq-mbigen.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,16 @@ static int mbigen_irq_domain_alloc(struct irq_domain *domain,
220220
return 0;
221221
}
222222

223+
static void mbigen_irq_domain_free(struct irq_domain *domain, unsigned int virq,
224+
unsigned int nr_irqs)
225+
{
226+
platform_msi_domain_free(domain, virq, nr_irqs);
227+
}
228+
223229
static const struct irq_domain_ops mbigen_domain_ops = {
224230
.translate = mbigen_domain_translate,
225231
.alloc = mbigen_irq_domain_alloc,
226-
.free = irq_domain_free_irqs_common,
232+
.free = mbigen_irq_domain_free,
227233
};
228234

229235
static int mbigen_of_create_domain(struct platform_device *pdev,

0 commit comments

Comments
 (0)