1
0
Fork 0

iommu/virtio: Reverse arguments to list_add

commit fb3637a113 upstream.

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: 2a5a314874 ("iommu/virtio: Add probe request")
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Link: https://lore.kernel.org/r/1588704467-13431-1-git-send-email-Julia.Lawall@inria.fr
Signed-off-by: Joerg Roedel <jroedel@suse.de>
5.4-rM2-2.2.x-imx-squashed
Julia Lawall 2020-05-05 20:47:47 +02:00 committed by Greg Kroah-Hartman
parent 1a31c4456a
commit 2e86e3841c
1 changed files with 1 additions and 1 deletions

View File

@ -454,7 +454,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;
}