aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-03-23 12:53:47 +0100
committerKevin Wolf <kwolf@redhat.com>2010-04-23 16:08:46 +0200
commitc835d00fc8d6c23af7e9182981ef7a07f1c6d12c (patch)
tree9c3790594ca229dc66845825131691681723d815
parent79a31189d4e3d226c6c700d630476ec63bbc19a2 (diff)
downloadqemu-c835d00fc8d6c23af7e9182981ef7a07f1c6d12c.zip
qemu-c835d00fc8d6c23af7e9182981ef7a07f1c6d12c.tar.gz
qemu-c835d00fc8d6c23af7e9182981ef7a07f1c6d12c.tar.bz2
qcow2: Fix error return code in qcow2_alloc_cluster_link_l2
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 <kwolf@redhat.com>
-rw-r--r--block/qcow2-cluster.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index 2f37acd..d2774d1 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -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;
}