From: Alex Williamson Date: Mon, 30 May 2016 13:58:10 +0000 (-0600) Subject: vfio/type1: Fix build warning X-Git-Tag: v4.14-rc1~3069^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=089f1c6b2daeab750fd92a28529928bc13c95d97;p=platform%2Fkernel%2Flinux-rpi.git 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 --- diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 15a6582..2ba1942 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,