From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDv8U-0005Ub-R1 for qemu-devel@nongnu.org; Mon, 26 Aug 2013 07:39:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VDv8O-00066Y-3t for qemu-devel@nongnu.org; Mon, 26 Aug 2013 07:39:06 -0400 From: Stefan Hajnoczi Date: Mon, 26 Aug 2013 13:38:50 +0200 Message-Id: <1377517130-12343-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PATCH] curl: qemu_bh_new() can never return NULL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Fam Zheng , Michael Tokarev , Stefan Hajnoczi Drop error code path which cannot be taken since qemu_bh_new() does not return NULL. Signed-off-by: Stefan Hajnoczi --- block/curl.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/block/curl.c b/block/curl.c index e566855..ca2cedc 100644 --- a/block/curl.c +++ b/block/curl.c @@ -572,12 +572,6 @@ static BlockDriverAIOCB *curl_aio_readv(BlockDriverState *bs, acb->nb_sectors = nb_sectors; acb->bh = qemu_bh_new(curl_readv_bh_cb, acb); - - if (!acb->bh) { - DPRINTF("CURL: qemu_bh_new failed\n"); - return NULL; - } - qemu_bh_schedule(acb->bh); return &acb->common; } -- 1.8.3.1