From patchwork Tue Jan 27 16:38:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 433576 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 51CC21401E7 for ; Wed, 28 Jan 2015 03:56:12 +1100 (AEDT) Received: from localhost ([::1]:48458 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YG9Qv-0007PK-MZ for incoming@patchwork.ozlabs.org; Tue, 27 Jan 2015 11:56:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YG9QX-000775-2o for qemu-devel@nongnu.org; Tue, 27 Jan 2015 11:55:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YG99v-0002gN-Dh for qemu-devel@nongnu.org; Tue, 27 Jan 2015 11:42:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YG99v-0002g4-4y for qemu-devel@nongnu.org; Tue, 27 Jan 2015 11:38:35 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0RGcY0i013685 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 27 Jan 2015 11:38:34 -0500 Received: from blackfin.pond.sub.org (ovpn-116-17.ams2.redhat.com [10.36.116.17]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0RGcWop032142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Jan 2015 11:38:33 -0500 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id E3F8430A4C16; Tue, 27 Jan 2015 17:38:31 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 27 Jan 2015 17:38:27 +0100 Message-Id: <1422376711-31648-3-git-send-email-armbru@redhat.com> In-Reply-To: <1422376711-31648-1-git-send-email-armbru@redhat.com> References: <1422376711-31648-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-trivial@redhat.com Subject: [Qemu-devel] [PATCH 2/6] rtl8139: g_malloc() can't fail, bury dead error handling X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Markus Armbruster --- hw/net/rtl8139.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 6fa9e0a..b55e438 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 "