On 06.01.2015 10:20, Luyao Huang wrote:
This place have a wrong logic, maybe forget goto cleanup.
Also fix some small things.

Signed-off-by: Luyao Huang <lhu...@redhat.com>
---
I am not sure i am right, but hotplug a net do not a address
may cause a issue.

  src/qemu/qemu_hotplug.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 5d0d8e0..bfe1bd0 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -924,7 +924,7 @@ int qemuDomainAttachNetDevice(virConnectPtr conn,

      /* Set device online immediately */
      if (qemuInterfaceStartDevice(net) < 0)
-       goto cleanup;
+        goto cleanup;

      /* Set Bandwidth */
      if (virNetDevSupportBandwidth(actualType) &&
@@ -952,7 +952,8 @@ int qemuDomainAttachNetDevice(virConnectPtr conn,
              goto cleanup;
      } else if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_S390)) {
          virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                        _("virtio-s390 net device cannot be hotplugged."));
+                       _("virtio-s390 net device cannot be hotplugged."));
+        goto cleanup;
      } else if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE) &&
                 virDomainPCIAddressEnsureAddr(priv->pciaddrs, &net->info) < 0) 
{
          goto cleanup;



ACKed and pushed.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to