1
0

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; goto cleanup;
} }
if (ret == 0) { if (ret == 0)
if (controller->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
controller->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI;
virDomainControllerInsertPreAlloced(vm->def, controller); virDomainControllerInsertPreAlloced(vm->def, controller);
}
cleanup: cleanup:
if (ret != 0 && releaseaddr) if (ret != 0 && releaseaddr)