From patchwork Fri Jul 24 05:23:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 37079 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6O5GKAU008651 for ; Fri, 24 Jul 2009 05:16:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751622AbZGXFQS (ORCPT ); Fri, 24 Jul 2009 01:16:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751623AbZGXFQS (ORCPT ); Fri, 24 Jul 2009 01:16:18 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50127 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbZGXFQR (ORCPT ); Fri, 24 Jul 2009 01:16:17 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6O5GHhm021036 for ; Fri, 24 Jul 2009 01:16:17 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6O5GG4g013554; Fri, 24 Jul 2009 01:16:17 -0400 Received: from localhost.localdomain (vpn-10-3.bos.redhat.com [10.16.10.3]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6O5GEF5015389; Fri, 24 Jul 2009 01:16:15 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com Subject: [PATCH] remove NULL check after qemu malloc Date: Fri, 24 Jul 2009 02:23:13 -0300 Message-Id: <1248412993-16335-1-git-send-email-glommer@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org it is not needed. Signed-off-by: Glauber Costa --- 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 {