From: Cyril Roelandt Date: Tue, 12 Feb 2013 04:01:50 +0000 (+0100) Subject: iommu/amd: Remove redundant NULL check before dma_ops_domain_free(). X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=91457df7733564015f846c501424610318a5b85f;p=linux-beck.git iommu/amd: Remove redundant NULL check before dma_ops_domain_free(). 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 Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index c1c74e030a58..f6f4a62ddf09 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -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;