]> Git Repo - linux.git/commitdiff
iommu/virtio: Reverse arguments to list_add
authorJulia Lawall <[email protected]>
Tue, 5 May 2020 18:47:47 +0000 (20:47 +0200)
committerJoerg Roedel <[email protected]>
Fri, 8 May 2020 15:31:18 +0000 (17:31 +0200)
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: 2a5a31487445 ("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]>
drivers/iommu/virtio-iommu.c

index d5cac4f46ca53e5976184e461af29d75790dedf6..4e1d11af23c81c74ad61a5032fe488c05a7b93fc 100644 (file)
@@ -453,7 +453,7 @@ static int viommu_add_resv_mem(struct viommu_endpoint *vdev,
        if (!region)
                return -ENOMEM;
 
-       list_add(&vdev->resv_regions, &region->list);
+       list_add(&region->list, &vdev->resv_regions);
        return 0;
 }
 
This page took 0.062118 seconds and 4 git commands to generate.