OSDN Git Service

rtl8139: g_malloc() can't fail, bury dead error handling
authorMarkus Armbruster <armbru@redhat.com>
Wed, 4 Feb 2015 10:26:03 +0000 (11:26 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 10 Feb 2015 06:27:20 +0000 (09:27 +0300)
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>
hw/net/rtl8139.c

index b7b87a6..2d1be06 100644 (file)
@@ -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 "