mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
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: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
This commit is contained in:
parent
9fd816ed33
commit
3ea7eb40ba
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user