This place have a wrong logic, maybe forget goto cleanup.
Also fix some small things.
Signed-off-by: Luyao Huang <lhuang@redhat.com>
/* Set device online immediately */
if (qemuInterfaceStartDevice(net) < 0)
- goto cleanup;
+ goto cleanup;
/* Set Bandwidth */
if (virNetDevSupportBandwidth(actualType) &&
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;