]> Git Repo - qemu.git/commitdiff
qcow2: Fix error return code in qcow2_alloc_cluster_link_l2
authorKevin Wolf <[email protected]>
Tue, 23 Mar 2010 11:53:47 +0000 (12:53 +0100)
committerKevin Wolf <[email protected]>
Fri, 23 Apr 2010 14:08:46 +0000 (16:08 +0200)
Fix qcow2_alloc_cluster_link_l2 to return the real error code like it does in
all other error cases.

Signed-off-by: Kevin Wolf <[email protected]>
block/qcow2-cluster.c

index 2f37acdb6b935ff89059de6e5099ee52d4813a9f..d2774d19ca7847a10344d5659b8797ff7e6e81f2 100644 (file)
@@ -687,8 +687,8 @@ int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2Meta *m)
                     (i << s->cluster_bits)) | QCOW_OFLAG_COPIED);
      }
 
-    if (write_l2_entries(s, l2_table, l2_offset, l2_index, m->nb_clusters) < 0) {
-        ret = -1;
+    ret = write_l2_entries(s, l2_table, l2_offset, l2_index, m->nb_clusters);
+    if (ret < 0) {
         goto err;
     }
 
This page took 0.027988 seconds and 4 git commands to generate.