Skip to content

Commit ff3669a

Browse files
Zenghui YuKAGA-KOKO
authored andcommitted
irqchip/alpine-msi: Fix off-by-one in allocation error path
When alpine_msix_gic_domain_alloc() fails, there is an off-by-one in the number of interrupts to be freed. Fix it by passing the number of successfully allocated interrupts, instead of the relative index of the last allocated one. Fixes: 3841245 ("irqchip/alpine-msi: Fix freeing of interrupts on allocation error path") Signed-off-by: Zenghui Yu <yuzenghui@huawei.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20240327142305.1048-1-yuzenghui@huawei.com
1 parent 14ced47 commit ff3669a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/irqchip/irq-alpine-msi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static int alpine_msix_middle_domain_alloc(struct irq_domain *domain,
165165
return 0;
166166

167167
err_sgi:
168-
irq_domain_free_irqs_parent(domain, virq, i - 1);
168+
irq_domain_free_irqs_parent(domain, virq, i);
169169
alpine_msix_free_sgi(priv, sgi, nr_irqs);
170170
return err;
171171
}

0 commit comments

Comments
 (0)