aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2008-09-03 19:58:35 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:53:05 -0400
commit1c7d1bcad218808a4f67a4492a5e1d920e85c239 (patch)
treec38074ceba9a32fd42a815b459205cc0ed715923
parent04e2ea67069e285404192a35c24dfe7c53b9c61f (diff)
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 <suresh.b.siddha@intel.com> Acked-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--drivers/pci/dmar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index ceb338dfa3f2..9527405ae198 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -212,7 +212,7 @@ dmar_parse_dev(struct dmar_drhd_unit *dmaru)
212 include_all = 1; 212 include_all = 1;
213 } 213 }
214 214
215 if (ret || (dmaru->devices_cnt == 0 && !dmaru->include_all)) { 215 if (ret) {
216 list_del(&dmaru->list); 216 list_del(&dmaru->list);
217 kfree(dmaru); 217 kfree(dmaru);
218 } 218 }