Skip to content

Commit f096d66

Browse files
bjorn-helgaasjoergroedel
authored andcommitted
iommu/vt-d: Remove misleading "domain 0" test from domain_exit()
The "Domain 0 is reserved, so dont process it" comment suggests that a NULL pointer corresponds to domain 0. I don't think that's true, and in any case, every caller supplies a non-NULL domain pointer that has already been dereferenced, so the test is unnecessary. Remove the test for a null "domain" pointer. No functional change intended. This null pointer check was added by 5e98c4b ("Allocation and free functions of virtual machine domain"). Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 7175323 commit f096d66

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/iommu/intel-iommu.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,10 +1903,6 @@ static void domain_exit(struct dmar_domain *domain)
19031903
{
19041904
struct page *freelist;
19051905

1906-
/* Domain 0 is reserved, so dont process it */
1907-
if (!domain)
1908-
return;
1909-
19101906
/* Remove associated devices and clear attached or cached domains */
19111907
rcu_read_lock();
19121908
domain_remove_dev_info(domain);

0 commit comments

Comments
 (0)