Skip to content

Commit 089f1c6

Browse files
committed
vfio/type1: Fix build warning
This function cannot actually be called with npage = 0, so in practice this doesn't return an uninitialized value. Signed-off-by: Alex Williamson <[email protected]>
1 parent 956b56a commit 089f1c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/vfio/vfio_iommu_type1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ static int map_try_harder(struct vfio_domain *domain, dma_addr_t iova,
515515
unsigned long pfn, long npage, int prot)
516516
{
517517
long i;
518-
int ret;
518+
int ret = 0;
519519

520520
for (i = 0; i < npage; i++, pfn++, iova += PAGE_SIZE) {
521521
ret = iommu_map(domain->domain, iova,

0 commit comments

Comments
 (0)