提交 3ea7eb40 编写于 作者: S Shivaprasad G Bhat 提交者: John Ferlan

qemu: Release address for redirected device hotplug attach failure

The virDomainUSBAddressEnsure returns 0 or -1, so commit id 'de325472'
checking for 1 like qemuDomainAttachChrDeviceAssignAddr was wrong.
Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
上级 9fd816ed
......@@ -1711,7 +1711,6 @@ int qemuDomainAttachRedirdevDevice(virConnectPtr conn,
virDomainRedirdevDefPtr redirdev)
{
int ret = -1;
int rc;
qemuDomainObjPrivatePtr priv = vm->privateData;
virDomainDefPtr def = vm->def;
char *charAlias = NULL;
......@@ -1728,10 +1727,9 @@ int qemuDomainAttachRedirdevDevice(virConnectPtr conn,
if (!(charAlias = qemuAliasChardevFromDevAlias(redirdev->info.alias)))
goto cleanup;
if ((rc = virDomainUSBAddressEnsure(priv->usbaddrs, &redirdev->info)) < 0)
if ((virDomainUSBAddressEnsure(priv->usbaddrs, &redirdev->info)) < 0)
goto cleanup;
if (rc == 1)
need_release = true;
need_release = true;
if (!(devstr = qemuBuildRedirdevDevStr(def, redirdev, priv->qemuCaps)))
goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册