rdma: g_malloc0() can't fail, bury dead error handling
authorMarkus Armbruster <armbru@redhat.com>
Wed, 4 Feb 2015 10:26:05 +0000 (11:26 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 10 Feb 2015 06:27:20 +0000 (09:27 +0300)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
migration/rdma.c

index fc351ea..29285e6 100644 (file)
@@ -1121,9 +1121,6 @@ static int qemu_rdma_register_and_get_keys(RDMAContext *rdma,
     /* allocate memory to store chunk MRs */
     if (!block->pmr) {
         block->pmr = g_malloc0(block->nb_chunks * sizeof(struct ibv_mr *));
-        if (!block->pmr) {
-            return -1;
-        }
     }
 
     /*