block/parallels: Simplify parallels_open() after previous commit
authorMarkus Armbruster <armbru@redhat.com>
Tue, 7 Jul 2020 16:06:06 +0000 (18:06 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 10 Jul 2020 13:18:08 +0000 (15:18 +0200)
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>

block/parallels.c

index 180dd41e2bfc17a67f4a23f1ea5f6166f2eecffc..cb5259ac447f3af349b7ace353fe2cac45465c29 100644 (file)
@@ -842,6 +842,7 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags,
                                        &local_err);
     g_free(buf);
     if (local_err != NULL) {
+        error_propagate(errp, local_err);
         goto fail_options;
     }
 
@@ -872,15 +873,11 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags,
 
 fail_format:
     error_setg(errp, "Image not in Parallels format");
+fail_options:
     ret = -EINVAL;
 fail:
     qemu_vfree(s->header);
     return ret;
-
-fail_options:
-    error_propagate(errp, local_err);
-    ret = -EINVAL;
-    goto fail;
 }