]> git.proxmox.com Git - mirror_qemu.git/blobdiff - block.c
iotests: Fix test 200 on s390x without virtio-pci
[mirror_qemu.git] / block.c
diff --git a/block.c b/block.c
index ed9253c786ac238eacb23726002e6f51f9371668..0a93ee9ac84c590ab8cd399a7d60c19d11c8a69b 100644 (file)
--- a/block.c
+++ b/block.c
@@ -4350,11 +4350,10 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
     QLIST_FOREACH_SAFE(c, &top->parents, next_parent, next) {
         /* Check whether we are allowed to switch c from top to base */
         GSList *ignore_children = g_slist_prepend(NULL, c);
-        bdrv_check_update_perm(base, NULL, c->perm, c->shared_perm,
-                               ignore_children, &local_err);
+        ret = bdrv_check_update_perm(base, NULL, c->perm, c->shared_perm,
+                                     ignore_children, &local_err);
         g_slist_free(ignore_children);
-        if (local_err) {
-            ret = -EPERM;
+        if (ret < 0) {
             error_report_err(local_err);
             goto exit;
         }