diff options
author | Kevin Wolf <kwolf@redhat.com> | 2010-03-23 12:53:47 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-04-23 16:08:46 +0200 |
commit | c835d00fc8d6c23af7e9182981ef7a07f1c6d12c (patch) | |
tree | 9c3790594ca229dc66845825131691681723d815 /block/qcow2-cluster.c | |
parent | 79a31189d4e3d226c6c700d630476ec63bbc19a2 (diff) |
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>
Diffstat (limited to 'block/qcow2-cluster.c')
-rw-r--r-- | block/qcow2-cluster.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 2f37acdb6b..d2774d19ca 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; } |