irqchip/gic-v3-its: Fix potential VPE leak on error

In its_vpe_irq_domain_alloc, when its_vpe_init() returns an error,
there is an off-by-one in the number of VPEs to be freed.

Fix it by simply passing the number of VPEs allocated, which is the
index of the loop iterating over the VPEs.

Fixes: 7d75bbb4bc1a ("irqchip/gic-v3-its: Add VPE irq domain allocation/teardown")
Signed-off-by: Kaige Fu <kaige.fu@linux.alibaba.com>
[maz: fixed commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/d9e36dee512e63670287ed9eff884a5d8d6d27f2.1631672311.git.kaige.fu@linux.alibaba.com

authored by Kaige Fu and committed by Marc Zyngier 280bef51 969ac78d

+1 -1
+1 -1
drivers/irqchip/irq-gic-v3-its.c
··· 4501 4502 if (err) { 4503 if (i > 0) 4504 - its_vpe_irq_domain_free(domain, virq, i - 1); 4505 4506 its_lpi_free(bitmap, base, nr_ids); 4507 its_free_prop_table(vprop_page);
··· 4501 4502 if (err) { 4503 if (i > 0) 4504 + its_vpe_irq_domain_free(domain, virq, i); 4505 4506 its_lpi_free(bitmap, base, nr_ids); 4507 its_free_prop_table(vprop_page);