Explorar o código

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 <tipecaml@gmail.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Cyril Roelandt %!s(int64=12) %!d(string=hai) anos
pai
achega
91457df773
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      drivers/iommu/amd_iommu.c

+ 1 - 2
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;