diff options
Diffstat (limited to 'block/qcow2.c')
-rw-r--r-- | block/qcow2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index a6a4f4772b..3f8a1281d7 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -273,8 +273,9 @@ static int qcow2_open(BlockDriverState *bs, int flags) } bs->backing_file[len] = '\0'; } - if (qcow2_read_snapshots(bs) < 0) { - ret = -EINVAL; + + ret = qcow2_read_snapshots(bs); + if (ret < 0) { goto fail; } |