arm/gic: fix a KASSERT in arm_gic_reserve_msi_range()

Fix the off-by-one in the KASSERT in arm_gic_reserve_msi_range()
allowing the MSIs being allocated at the end of the IRQ range.

Reported by:	bz
Submitted by:	andrew
Reviewed by:	andrew
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D36291
This commit is contained in:
Bjoern A. Zeeb
2022-08-22 11:51:37 +00:00
parent 57af517ac4
commit 11d08e7e8d
+1 -1
View File
@@ -288,7 +288,7 @@ arm_gic_reserve_msi_range(device_t dev, u_int start, u_int count)
sc = device_get_softc(dev);
KASSERT((start + count) < sc->nirqs,
KASSERT((start + count) <= sc->nirqs,
("%s: Trying to allocate too many MSI IRQs: %d + %d > %d", __func__,
start, count, sc->nirqs));
for (i = 0; i < count; i++) {