qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] curl: qemu_bh_new() can never return NULL
@ 2013-08-26 11:38 Stefan Hajnoczi
  2013-08-26 13:48 ` Paolo Bonzini
  2013-09-01 15:12 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2013-08-26 11:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, 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 <stefanha@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-01 15:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-26 11:38 [Qemu-devel] [PATCH] curl: qemu_bh_new() can never return NULL Stefan Hajnoczi
2013-08-26 13:48 ` Paolo Bonzini
2013-09-01 15:12 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).