From: Suresh Siddha Date: Wed, 3 Sep 2008 23:58:35 +0000 (-0700) Subject: dmar: fix dmar_parse_dev() devices_cnt error condition check X-Git-Tag: v2.6.28-rc1~80^2~64 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1c7d1bcad218808a4f67a4492a5e1d920e85c239;p=linux-2.6-omap-h63xx.git dmar: fix dmar_parse_dev() devices_cnt error condition check It is possible that, instead of PCI endpoint/sub-hierarchy structures, only IO-APIC/HPET devices may be reported under device scope structures. Fix the devices_cnt error check, which cares about only PCI structures and removes the dma-remapping unit structure (dmaru) when the devices_cnt is zero and include_all flag is not set. Signed-off-by: Suresh Siddha Acked-by: Yinghai Lu Signed-off-by: Ingo Molnar --- diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index ceb338dfa3f..9527405ae19 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c @@ -212,7 +212,7 @@ dmar_parse_dev(struct dmar_drhd_unit *dmaru) include_all = 1; } - if (ret || (dmaru->devices_cnt == 0 && !dmaru->include_all)) { + if (ret) { list_del(&dmaru->list); kfree(dmaru); }