mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 17:52:43 +00:00
iommu_gas: Correct a broken KASSERT
If iommu_gas_find_space() ever called iommu_gas_uppermatch(), and it succeeded in allocating space, then the subsequent KASSERT would be triggered. Change that KASSERT to accept either success or ENOMEM. MFC after: 1 week
This commit is contained in:
parent
ad0a7ea650
commit
e6775534ae
@ -504,7 +504,7 @@ iommu_gas_find_space(struct iommu_domain *domain,
|
||||
if (common->highaddr >= domain->end)
|
||||
return (ENOMEM);
|
||||
error = iommu_gas_uppermatch(&a, RB_ROOT(&domain->rb_root));
|
||||
KASSERT(error == ENOMEM,
|
||||
KASSERT(error == 0 || error == ENOMEM,
|
||||
("error %d from iommu_gas_uppermatch", error));
|
||||
return (error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user