From: John Ferlan Date: Thu, 16 Jul 2015 12:32:53 +0000 (-0400) Subject: conf: Remove extraneous check in virDomainHostdevAssignAddress X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8b97ba2952bd6eb16bb475eb100803ac8bf95086;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git conf: Remove extraneous check in virDomainHostdevAssignAddress 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 --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6b557d148..463d19960 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -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;