block/parallels: Simplify parallels_open() after previous commit
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20200707160613.848843-39-armbru@redhat.com>
This commit is contained in:
parent
a5f9b9df25
commit
4bc6d7ee0e
|
@ -842,6 +842,7 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags,
|
||||||
&local_err);
|
&local_err);
|
||||||
g_free(buf);
|
g_free(buf);
|
||||||
if (local_err != NULL) {
|
if (local_err != NULL) {
|
||||||
|
error_propagate(errp, local_err);
|
||||||
goto fail_options;
|
goto fail_options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -872,15 +873,11 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags,
|
||||||
|
|
||||||
fail_format:
|
fail_format:
|
||||||
error_setg(errp, "Image not in Parallels format");
|
error_setg(errp, "Image not in Parallels format");
|
||||||
|
fail_options:
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
fail:
|
fail:
|
||||||
qemu_vfree(s->header);
|
qemu_vfree(s->header);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
fail_options:
|
|
||||||
error_propagate(errp, local_err);
|
|
||||||
ret = -EINVAL;
|
|
||||||
goto fail;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue