iommu/amd: Remove redundant NULL check before dma_ops_domain_free().
authorCyril Roelandt <tipecaml@gmail.com>
Tue, 12 Feb 2013 04:01:50 +0000 (05:01 +0100)
committerJoerg Roedel <joro@8bytes.org>
Wed, 13 Feb 2013 11:10:53 +0000 (12:10 +0100)
dma_ops_domain_free on a NULL pointer is a no-op, so the NULL check in
amd_iommu_init_dma_ops() can be removed.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
drivers/iommu/amd_iommu.c

index c1c74e030a58df6ea1020cec05c0f01acb14fb76..f6f4a62ddf094e9cbf992230cb92ca48ba799795 100644 (file)
@@ -3187,8 +3187,7 @@ int __init amd_iommu_init_dma_ops(void)
 free_domains:
 
        for_each_iommu(iommu) {
-               if (iommu->default_dom)
-                       dma_ops_domain_free(iommu->default_dom);
+               dma_ops_domain_free(iommu->default_dom);
        }
 
        return ret;