]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
dmar: fix dmar_parse_dev() devices_cnt error condition check
authorSuresh Siddha <suresh.b.siddha@intel.com>
Wed, 3 Sep 2008 23:58:35 +0000 (16:58 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 16 Oct 2008 14:53:05 +0000 (16:53 +0200)
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 <suresh.b.siddha@intel.com>
Acked-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
drivers/pci/dmar.c

index ceb338dfa3f27b82f1b284f764ec14f8f508c6d2..9527405ae19842eb5611dff2eff67d26a9c23675 100644 (file)
@@ -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);
        }