]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: hotplug: Use more common 'cleanup' label in qemuDomainAttachDeviceDiskLive
authorPeter Krempa <pkrempa@redhat.com>
Tue, 2 Feb 2016 13:59:24 +0000 (14:59 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 8 Feb 2016 08:08:38 +0000 (09:08 +0100)
src/qemu/qemu_hotplug.c

index 43f686c99979dd566f3a8a446eb690ba5eea3e5f..fa83c6e364664e278e2e2b70c76777c9c4a23fe6 100644 (file)
@@ -779,20 +779,20 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                        _("unsupported driver name '%s' for disk '%s'"),
                        virDomainDiskGetDriver(disk), src);
-        goto end;
+        goto cleanup;
     }
 
     if (virStorageTranslateDiskSourcePool(conn, disk) < 0)
-        goto end;
+        goto cleanup;
 
     if (qemuAddSharedDevice(driver, dev, vm->def->name) < 0)
-        goto end;
+        goto cleanup;
 
     if (qemuSetUnprivSGIO(dev) < 0)
-        goto end;
+        goto cleanup;
 
     if (qemuDomainDetermineDiskChain(driver, vm, disk, false, true) < 0)
-        goto end;
+        goto cleanup;
 
     switch ((virDomainDiskDevice) disk->device)  {
     case VIR_DOMAIN_DISK_DEVICE_CDROM:
@@ -805,12 +805,12 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
                              "by libvirt"),
                            virDomainDiskBusTypeToString(disk->bus),
                            disk->dst);
-            goto end;
+            goto cleanup;
         }
 
         if (qemuDomainChangeEjectableMedia(driver, conn, vm, orig_disk,
                                            disk->src, false) < 0)
-            goto end;
+            goto cleanup;
 
         disk->src = NULL;
         ret = 0;
@@ -853,7 +853,7 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
         break;
     }
 
end:
cleanup:
     if (ret != 0)
         ignore_value(qemuRemoveSharedDevice(driver, dev, vm->def->name));
     return ret;