提交 089f1c6b 编写于 作者: A Alex Williamson

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: NAlex Williamson <alex.williamson@redhat.com>
上级 956b56a9
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册