kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remove NULL check after qemu malloc
@ 2009-07-24  5:23 Glauber Costa
  2009-07-29 11:55 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Glauber Costa @ 2009-07-24  5:23 UTC (permalink / raw)
  To: kvm; +Cc: avi

it is not needed.

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] remove NULL check after qemu malloc
  2009-07-24  5:23 [PATCH] remove NULL check after qemu malloc Glauber Costa
@ 2009-07-29 11:55 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-07-29 11:55 UTC (permalink / raw)
  To: Glauber Costa; +Cc: kvm

On 07/24/2009 08:23 AM, Glauber Costa wrote:
> it is not needed.
>    

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-29 11:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-24  5:23 [PATCH] remove NULL check after qemu malloc Glauber Costa
2009-07-29 11:55 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).