mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 15:29:16 +00:00
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>
This commit is contained in:
parent
956b56a984
commit
089f1c6b2d
@ -515,7 +515,7 @@ static int map_try_harder(struct vfio_domain *domain, dma_addr_t iova,
|
|||||||
unsigned long pfn, long npage, int prot)
|
unsigned long pfn, long npage, int prot)
|
||||||
{
|
{
|
||||||
long i;
|
long i;
|
||||||
int ret;
|
int ret = 0;
|
||||||
|
|
||||||
for (i = 0; i < npage; i++, pfn++, iova += PAGE_SIZE) {
|
for (i = 0; i < npage; i++, pfn++, iova += PAGE_SIZE) {
|
||||||
ret = iommu_map(domain->domain, iova,
|
ret = iommu_map(domain->domain, iova,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user