From 23d3a98c13ee0ffe2647121fac7533282643e6f1 Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Thu, 13 Aug 2015 11:15:13 +0200 Subject: iommu/amd: Use BUG_ON instead of if () BUG() Found by a coccicheck script. Signed-off-by: Joerg Roedel --- drivers/iommu/amd_iommu_v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/iommu/amd_iommu_v2.c') diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c index f7b875bb70d4..1131664b918b 100644 --- a/drivers/iommu/amd_iommu_v2.c +++ b/drivers/iommu/amd_iommu_v2.c @@ -356,8 +356,8 @@ static void free_pasid_states(struct device_state *dev_state) free_pasid_states_level2(dev_state->states); else if (dev_state->pasid_levels == 1) free_pasid_states_level1(dev_state->states); - else if (dev_state->pasid_levels != 0) - BUG(); + else + BUG_ON(dev_state->pasid_levels != 0); free_page((unsigned long)dev_state->states); } -- cgit v1.2.3