提交 a791599c 编写于 作者: L Luyao Huang 提交者: Michal Privoznik

qemu: fix miss goto cleanup in qemuDomainAttachNetDevice

This place have a wrong logic, maybe forget goto cleanup.
Also fix some small things.
Signed-off-by: NLuyao Huang <lhuang@redhat.com>
上级 18ec863d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册