qemuDomainAttachControllerDevice: remove dead code

After a successful attach, the device address has already been set.
Remove the pointless assignment.
This commit is contained in:
Ján Tomko 2017-10-12 15:06:56 +02:00
parent 2690b5b930
commit 7afaaa934b

View File

@ -590,11 +590,8 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver,
goto cleanup;
}
if (ret == 0) {
if (controller->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
controller->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI;
if (ret == 0)
virDomainControllerInsertPreAlloced(vm->def, controller);
}
cleanup:
if (ret != 0 && releaseaddr)