From: Olaf Hering Date: Fri, 24 Apr 2015 16:01:02 +0000 (+0000) Subject: libxl: remove duplicate check for pci subsystem type X-Git-Tag: v1.2.15-rc1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb5fc7214ed03d2c3bd7b0ce8717d418f92d1858;p=thirdparty%2Flibvirt.git libxl: remove duplicate check for pci subsystem type Both attach and detach functions get called only if the type matches. Signed-off-by: Olaf Hering Cc: Jim Fehlig --- diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index d76efda9b7..f915f91119 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -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,