Skip to content

Commit fb3637a

Browse files
JuliaLawalljoergroedel
authored andcommitted
iommu/virtio: Reverse arguments to list_add
Elsewhere in the file, there is a list_for_each_entry with &vdev->resv_regions as the second argument, suggesting that &vdev->resv_regions is the list head. So exchange the arguments on the list_add call to put the list head in the second argument. Fixes: 2a5a314 ("iommu/virtio: Add probe request") Signed-off-by: Julia Lawall <[email protected]> Reviewed-by: Jean-Philippe Brucker <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 119b2b2 commit fb3637a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/virtio-iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ static int viommu_add_resv_mem(struct viommu_endpoint *vdev,
453453
if (!region)
454454
return -ENOMEM;
455455

456-
list_add(&vdev->resv_regions, &region->list);
456+
list_add(&region->list, &vdev->resv_regions);
457457
return 0;
458458
}
459459

0 commit comments

Comments
 (0)