vfio/type1: Fix vfio_find_dma_valid return
authorAnthony Yznaga <anthony.yznaga@oracle.com>
Mon, 23 Aug 2021 16:35:50 +0000 (09:35 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 24 Aug 2021 18:09:50 +0000 (12:09 -0600)
commitffc95d1b8edb80d2dab77f2e8a823c8d93b06419
tree295f50bada973e2c80d801401e6336d101e2f796
parenteb24c1007e6852e024dc33b0dd9617b8500a1291
vfio/type1: Fix vfio_find_dma_valid return

vfio_find_dma_valid is defined to return WAITED on success if it was
necessary to wait.  However, the loop forgets the WAITED value returned
by vfio_wait() and returns 0 in a later iteration.  Fix it.

Signed-off-by: Anthony Yznaga <anthony.yznaga@oracle.com>
Reviewed-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1629736550-2388-1-git-send-email-anthony.yznaga@oracle.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio_iommu_type1.c