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:
+1
-1
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user