aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iommu
diff options
context:
space:
mode:
authorDoug Moore <dougm@FreeBSD.org>2022-06-21 00:34:46 +0000
committerDoug Moore <dougm@FreeBSD.org>2022-06-21 00:34:46 +0000
commit70b5d8fa0f9457833027e4a1c57b4e68a9351cac (patch)
treec67643c6aea1ac4c20ce33ec0c24773079456fba /sys/dev/iommu
parent0586a12904461c3d99eb76e1d66706782c0d14be (diff)
Diffstat (limited to 'sys/dev/iommu')
-rw-r--r--sys/dev/iommu/iommu_gas.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c
index f25519552d1c..70eef9a0a1f7 100644
--- a/sys/dev/iommu/iommu_gas.c
+++ b/sys/dev/iommu/iommu_gas.c
@@ -398,16 +398,11 @@ iommu_gas_lowermatch(struct iommu_gas_match_args *a, struct iommu_map_entry *ent
*/
entry = first;
while (entry != NULL) {
- if ((first = RB_LEFT(entry, rb_entry)) != NULL) {
- if (first->last >= a->common->lowaddr) {
- /* All remaining ranges >= lowaddr */
- break;
- }
- if (iommu_gas_match_one(a, first->last, entry->start,
- a->common->lowaddr)) {
- iommu_gas_match_insert(a);
- return (0);
- }
+ if ((first = RB_LEFT(entry, rb_entry)) != NULL &&
+ iommu_gas_match_one(a, first->last, entry->start,
+ a->common->lowaddr)) {
+ iommu_gas_match_insert(a);
+ return (0);
}
if (entry->end >= a->common->lowaddr) {
/* All remaining ranges >= lowaddr */