mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
irqchip/gic-v3-its: Gracefully fail on LPI exhaustion
[ Upstream commit45725e0fc3] In the unlikely event that we cannot find any available LPI in the system, we should gracefully return an error instead of carrying on with no LPI allocated at all. Fixes:38dd7c494c("irqchip/gic-v3-its: Drop chunk allocation compatibility") Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
dc81cfafb4
commit
423869f887
@@ -1581,6 +1581,9 @@ static unsigned long *its_lpi_alloc(int nr_irqs, u32 *base, int *nr_ids)
|
||||
nr_irqs /= 2;
|
||||
} while (nr_irqs > 0);
|
||||
|
||||
if (!nr_irqs)
|
||||
err = -ENOSPC;
|
||||
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user