From: Keir Fraser Date: Fri, 11 Apr 2008 08:12:56 +0000 (+0100) Subject: VT-d: DMAR device scope parse fixup X-Git-Tag: 3.3.0-rc1~243^2~22 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5bb8a6fad8814dc597bc7c37df46aac98c9300ff;p=xen.git VT-d: DMAR device scope parse fixup Previously applied sanity check fixup is incorrect. Signed-off-by: Espen Skoglund --- diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c index 19d5675a1b..0685d84010 100644 --- a/xen/drivers/passthrough/vtd/dmar.c +++ b/xen/drivers/passthrough/vtd/dmar.c @@ -231,7 +231,7 @@ static int scope_device_count(void *start, void *end) bus = scope->start_bus; depth = (scope->length - sizeof(struct acpi_dev_scope)) / sizeof(struct acpi_pci_path); - while ( --depth >= 0 ) + while ( --depth > 0 ) { bus = read_pci_config_byte( bus, path->dev, path->fn, PCI_SECONDARY_BUS); @@ -353,7 +353,7 @@ static int __init acpi_parse_dev_scope( / sizeof(struct acpi_pci_path); bus = scope->start_bus; - while ( --depth >= 0 ) + while ( --depth > 0 ) { bus = read_pci_config_byte( bus, path->dev, path->fn, PCI_SECONDARY_BUS);