iommu/vt-d: Use BUG_ON instead of if () BUG()

Found by a coccicheck script.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
Joerg Roedel 2015-08-13 11:15:13 +02:00
parent 30e93761fb
commit dc02e46e8d

View file

@ -4760,8 +4760,7 @@ static size_t intel_iommu_unmap(struct iommu_domain *domain,
/* Cope with horrid API which requires us to unmap more than the /* Cope with horrid API which requires us to unmap more than the
size argument if it happens to be a large-page mapping. */ size argument if it happens to be a large-page mapping. */
if (!pfn_to_dma_pte(dmar_domain, iova >> VTD_PAGE_SHIFT, &level)) BUG_ON(!pfn_to_dma_pte(dmar_domain, iova >> VTD_PAGE_SHIFT, &level));
BUG();
if (size < VTD_PAGE_SIZE << level_to_offset_bits(level)) if (size < VTD_PAGE_SIZE << level_to_offset_bits(level))
size = VTD_PAGE_SIZE << level_to_offset_bits(level); size = VTD_PAGE_SIZE << level_to_offset_bits(level);