Skip to contentSkip to conversation

curl: qemu_bh_new() can never return NULL

PATCH Applied Stefan Hajnoczi 3 participants 3 messages Aug 26, 2013 – Sep 1, 2013 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 curl: qemu_bh_new() can never return NULL

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

---
 block/curl.c | 6 ------
 1 file changed, 6 deletions(-)
block/curl.c +0 -6
index e566855..ca2cedc 100644
@@ -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;
 }
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw

Il 26/08/2013 13:38, Stefan Hajnoczi ha scritto:

Quoted 16 lines

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

---
 block/curl.c | 6 ------
 1 file changed, 6 deletions(-)
block/curl.c +0 -0
index e566855..ca2cedc 100644
@@ -572,12 +572,6 @@ static BlockDriverAIOCB *curl_aio_readv(BlockDriverState *bs,
     acb->nb_sectors = nb_sectors;
 

block/curl.c static BlockDriverAIOCB *curl_aio_readv(BlockDriverState *bs, · line 577

Quoted 10 lines
block/curl.c +0 -6
     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;
 }