diff options
author | 2016-05-30 07:58:10 -0600 | |
---|---|---|
committer | 2016-05-30 07:58:10 -0600 | |
commit | 089f1c6b2daeab750fd92a28529928bc13c95d97 (patch) | |
tree | 830e69438b06d0b141c0acc9973317d743b5129b /drivers/vfio/vfio_iommu_type1.c | |
parent | vfio/pci: Fix ordering of eventfd vs virqfd shutdown (diff) | |
download | linux-089f1c6b2daeab750fd92a28529928bc13c95d97.tar.gz linux-089f1c6b2daeab750fd92a28529928bc13c95d97.tar.bz2 linux-089f1c6b2daeab750fd92a28529928bc13c95d97.zip |
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 <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/vfio_iommu_type1.c')
-rw-r--r-- | drivers/vfio/vfio_iommu_type1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 15a65823aad9..2ba19424e4a1 100644 --- a/drivers/vfio/vfio_iommu_type1.c +++ b/drivers/vfio/vfio_iommu_type1.c @@ -515,7 +515,7 @@ static int map_try_harder(struct vfio_domain *domain, dma_addr_t iova, unsigned long pfn, long npage, int prot) { long i; - int ret; + int ret = 0; for (i = 0; i < npage; i++, pfn++, iova += PAGE_SIZE) { ret = iommu_map(domain->domain, iova, |