qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] virtio: Remove malloc failure checks


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH] virtio: Remove malloc failure checks
Date: Mon, 09 Feb 2009 10:55:51 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

No need to check for failing qemu_malloc anymore.

Signed-off-by: Jan Kiszka <address@hidden>
Acked-by: Mark McLoughlin <address@hidden>
---

 hw/virtio-net.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 62153e9..b56c10f 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -598,12 +598,8 @@ void virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
     n->promisc = 1; /* for compatibility */
 
     n->mac_table.macs = qemu_mallocz(MAC_TABLE_ENTRIES * ETH_ALEN);
-    if (!n->mac_table.macs)
-        return;
 
     n->vlans = qemu_mallocz(MAX_VLAN >> 3);
-    if (!n->vlans)
-        return;
 
     register_savevm("virtio-net", virtio_net_id++, VIRTIO_NET_VM_VERSION,
                     virtio_net_save, virtio_net_load, n);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]