From: Bjorn Helgaas Date: Fri, 8 Feb 2019 22:06:22 +0000 (-0600) Subject: iommu/vt-d: Remove misleading "domain 0" test from domain_exit() X-Git-Tag: v5.4.17~4020^2^5~12 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f096d6657a7714e62a4799893ac9bdee75be29c8;p=arm%2Flinux.git 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 5e98c4b1d6e8 ("Allocation and free functions of virtual machine domain"). Signed-off-by: Bjorn Helgaas Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index e06913460cc3..271455e5026e 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -1903,10 +1903,6 @@ static void domain_exit(struct dmar_domain *domain) { struct page *freelist; - /* Domain 0 is reserved, so dont process it */ - if (!domain) - return; - /* Remove associated devices and clear attached or cached domains */ rcu_read_lock(); domain_remove_dev_info(domain);