Explorar el Código

kvm/iommu: fix compile warning

This fixes a compile warning about a variable thats maybe used
uninitialized in the function.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Joerg Roedel hace 16 años
padre
commit
7398ca79d2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      virt/kvm/iommu.c

+ 1 - 1
virt/kvm/iommu.c

@@ -71,7 +71,7 @@ unmap_pages:
 
 static int kvm_iommu_map_memslots(struct kvm *kvm)
 {
-	int i, r;
+	int i, r = 0;
 
 	down_read(&kvm->slots_lock);
 	for (i = 0; i < kvm->nmemslots; i++) {