}
}
- if (virDomainNetGetActualType(detach) == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
- ret = qemuDomainDetachThisHostDevice(driver, vm,
- virDomainNetGetActualHostdev(detach),
- -1);
- goto cleanup;
- }
-
if (!detach) {
qemuReportError(VIR_ERR_OPERATION_FAILED,
_("network device %02x:%02x:%02x:%02x:%02x:%02x not found"),
goto cleanup;
}
+ if (virDomainNetGetActualType(detach) == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
+ ret = qemuDomainDetachThisHostDevice(driver, vm,
+ virDomainNetGetActualHostdev(detach),
+ -1);
+ goto cleanup;
+ }
+
if (!virDomainDeviceAddressIsValid(&detach->info,
VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI)) {
qemuReportError(VIR_ERR_OPERATION_FAILED,