Skip to content

Commit

Permalink
iommu/amd: Remove redundant NULL check before dma_ops_domain_free().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cyril Roelandt authored and Joerg Roedel committed Feb 13, 2013
1 parent f528d98 commit 91457df
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 91457df

Please sign in to comment.