summary refs log tree commit diff stats
path: root/hw/net/rtl8139.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-02-04 11:26:03 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2015-02-10 09:27:20 +0300
commit66c5f3e596398a84949fb39e3d7b5f2c0ce3ea0f (patch)
treebbf3ea447d5fcb87dc7a97068c0cd68ef8f14a94 /hw/net/rtl8139.c
parent6b0126f94099db15fb0110218b17eeccefa077d1 (diff)
downloadfocaccia-qemu-66c5f3e596398a84949fb39e3d7b5f2c0ce3ea0f.tar.gz
focaccia-qemu-66c5f3e596398a84949fb39e3d7b5f2c0ce3ea0f.zip
rtl8139: g_malloc() can't fail, bury dead error handling
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/net/rtl8139.c')
-rw-r--r--hw/net/rtl8139.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index b7b87a60cf..2d1be06f41 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -2075,20 +2075,6 @@ static int rtl8139_cplus_transmit_one(RTL8139State *s)
                 "length to %d\n", txsize);
     }
 
-    if (!s->cplus_txbuffer)
-    {
-        /* out of memory */
-
-        DPRINTF("+++ C+ mode transmiter failed to reallocate %d bytes\n",
-            s->cplus_txbuffer_len);
-
-        /* update tally counter */
-        ++s->tally_counters.TxERR;
-        ++s->tally_counters.TxAbt;
-
-        return 0;
-    }
-
     /* append more data to the packet */
 
     DPRINTF("+++ C+ mode transmit reading %d bytes from host memory at "