From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDx9w-0001na-8m for qemu-devel@nongnu.org; Mon, 26 Aug 2013 09:48:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VDx9n-0001GH-I6 for qemu-devel@nongnu.org; Mon, 26 Aug 2013 09:48:44 -0400 Sender: Paolo Bonzini Message-ID: <521B5CAC.8090201@redhat.com> Date: Mon, 26 Aug 2013 15:48:28 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1377517130-12343-1-git-send-email-stefanha@redhat.com> In-Reply-To: <1377517130-12343-1-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] curl: qemu_bh_new() can never return NULL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-trivial@nongnu.org, Michael Tokarev , Fam Zheng , qemu-devel@nongnu.org Il 26/08/2013 13:38, Stefan Hajnoczi ha scritto: > 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; > } > Reviewed-by: Paolo Bonzini