aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2015-08-13 05:15:13 -0400
committerJoerg Roedel <jroedel@suse.de>2015-08-13 13:49:46 -0400
commitdc02e46e8d0234eed9f6e42f50763b406c380bc4 (patch)
treea3b9931f4f7c35845eed1bf361ccd3e07ae4738c
parent30e93761fbf706c0f8a6f7d1abc1b0ddbeea208c (diff)
iommu/vt-d: Use BUG_ON instead of if () BUG()
Found by a coccicheck script. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r--drivers/iommu/intel-iommu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 8834765e90c6..2a7e01798f4b 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -4760,8 +4760,7 @@ static size_t intel_iommu_unmap(struct iommu_domain *domain,
4760 4760
4761 /* Cope with horrid API which requires us to unmap more than the 4761 /* Cope with horrid API which requires us to unmap more than the
4762 size argument if it happens to be a large-page mapping. */ 4762 size argument if it happens to be a large-page mapping. */
4763 if (!pfn_to_dma_pte(dmar_domain, iova >> VTD_PAGE_SHIFT, &level)) 4763 BUG_ON(!pfn_to_dma_pte(dmar_domain, iova >> VTD_PAGE_SHIFT, &level));
4764 BUG();
4765 4764
4766 if (size < VTD_PAGE_SIZE << level_to_offset_bits(level)) 4765 if (size < VTD_PAGE_SIZE << level_to_offset_bits(level))
4767 size = VTD_PAGE_SIZE << level_to_offset_bits(level); 4766 size = VTD_PAGE_SIZE << level_to_offset_bits(level);