qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] virtio: Remove malloc failure checks
Date: Mon, 09 Feb 2009 10:55:51 +0100	[thread overview]
Message-ID: <498FFDA7.1030203@siemens.com> (raw)

No need to check for failing qemu_malloc anymore.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Mark McLoughlin <markmc@redhat.com>
---

 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	other threads:[~2009-02-09  9:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-09  9:55 Jan Kiszka [this message]
2009-02-16 15:47 ` [Qemu-devel] [PATCH] virtio: Remove malloc failure checks Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=498FFDA7.1030203@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).