提交 bb5fc721 编写于 作者: O Olaf Hering 提交者: Jim Fehlig

libxl: remove duplicate check for pci subsystem type

Both attach and detach functions get called only if the type matches.
Signed-off-by: NOlaf Hering <olaf@aepfle.de>
Cc: Jim Fehlig <jfehlig@suse.com>
上级 f54391b4
......@@ -2901,9 +2901,6 @@ libxlDomainAttachHostPCIDevice(libxlDriverPrivatePtr driver,
libxl_device_pci_init(&pcidev);
if (hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI)
goto cleanup;
if (virDomainHostdevFind(vm->def, hostdev, &found) >= 0) {
virReportError(VIR_ERR_OPERATION_FAILED,
_("target pci device %.4x:%.2x:%.2x.%.1x already exists"),
......@@ -3239,9 +3236,6 @@ libxlDomainDetachHostPCIDevice(libxlDriverPrivatePtr driver,
libxl_device_pci_init(&pcidev);
if (subsys->type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI)
goto cleanup;
idx = virDomainHostdevFind(vm->def, hostdev, &detach);
if (idx < 0) {
virReportError(VIR_ERR_OPERATION_FAILED,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册