kvm/iommu: fix compile warning
authorJoerg Roedel <joerg.roedel@amd.com>
Sat, 3 Jan 2009 15:37:53 +0000 (16:37 +0100)
committerJoerg Roedel <joerg.roedel@amd.com>
Sat, 3 Jan 2009 15:37:53 +0000 (16:37 +0100)
This fixes a compile warning about a variable thats maybe used
uninitialized in the function.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
virt/kvm/iommu.c

index d0bebaa..e9693a2 100644 (file)
@@ -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++) {