Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1410562 > unrolled thread

[PATCH] vfio/type1: Fix build warning

Started byAlex Williamson <alex.williamson@redhat.com>
First post2016-05-31 21:30 +0200
Last post2016-05-31 21:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] vfio/type1: Fix build warning Alex Williamson <alex.williamson@redhat.com> - 2016-05-31 21:30 +0200

#1410562 — [PATCH] vfio/type1: Fix build warning

FromAlex Williamson <alex.williamson@redhat.com>
Date2016-05-31 21:30 +0200
Subject[PATCH] vfio/type1: Fix build warning
Message-ID<rEXwu-6KR-27@gated-at.bofh.it>
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>
---
 drivers/vfio/vfio_iommu_type1.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web