]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Remove extraneous check in virDomainHostdevAssignAddress
authorJohn Ferlan <jferlan@redhat.com>
Thu, 16 Jul 2015 12:32:53 +0000 (08:32 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 3 Aug 2015 20:48:45 +0000 (16:48 -0400)
Since the only way virDomainHostdevAssignAddress can be called is from
within virDomainHostdevDefParseXML when hostdev->source.subsys.type is
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI, thus there's no need for redundancy.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/conf/domain_conf.c

index 6b557d14813e5f9a481b80914385a0d980fba5ef..463d19960d0782fe5aba22f92295df660aa30da7 100644 (file)
@@ -5342,9 +5342,6 @@ virDomainHostdevAssignAddress(virDomainXMLOptionPtr xmlopt,
     size_t i;
     int ret;
 
-    if (hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI)
-        return -1;
-
     for (i = 0; i < def->ncontrollers; i++) {
         if (def->controllers[i]->type != VIR_DOMAIN_CONTROLLER_TYPE_SCSI)
             continue;