[PATCH] remove NULL check after qemu malloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



it is not needed.

Signed-off-by: Glauber Costa <glommer@xxxxxxxxxx>
---
 qemu-kvm.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 5e7dc0a..b15d5d6 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -2356,13 +2356,7 @@ int kvm_physical_memory_set_dirty_tracking(int enable)
         if (!kvm_dirty_bitmap) {
             unsigned bitmap_size = BITMAP_SIZE(phys_ram_size);
             kvm_dirty_bitmap = qemu_malloc(bitmap_size);
-            if (kvm_dirty_bitmap == NULL) {
-                perror("Failed to allocate dirty pages bitmap");
-                r=-1;
-            }
-            else {
-                r = kvm_dirty_pages_log_enable_all(kvm_context);
-            }
+            r = kvm_dirty_pages_log_enable_all(kvm_context);
         }
     }
     else {
-- 
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux