Patchwork [PULL,06/15] curl: qemu_bh_new() can never return NULL

login
register
mail settings
Submitter Michael Tokarev
Date Sept. 2, 2013, 11:01 a.m.
Message ID <1378119695-14568-7-git-send-email-mjt@msgid.tls.msk.ru>
Download mbox | patch
Permalink /patch/271890/
State New
Headers show

Comments

Michael Tokarev - Sept. 2, 2013, 11:01 a.m.
From: Stefan Hajnoczi <stefanha@redhat.com>

Drop error code path which cannot be taken since qemu_bh_new() does not
return NULL.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 block/curl.c |    6 ------
 1 file changed, 6 deletions(-)

Patch

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;
 }