summaryrefslogtreecommitdiff
path: root/drivers/iommu/amd_iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2015-08-13 12:15:13 +0300
committerJoerg Roedel <jroedel@suse.de>2015-08-13 20:49:14 +0300
commit23d3a98c13ee0ffe2647121fac7533282643e6f1 (patch)
treef9e629c69b1c8821899479b42b1036ef826c3eb1 /drivers/iommu/amd_iommu.c
parent4160cd9e5ef9ac9f1c9c429e1606bf08a56c8a49 (diff)
downloadlinux-23d3a98c13ee0ffe2647121fac7533282643e6f1.tar.xz
iommu/amd: Use BUG_ON instead of if () BUG()
Found by a coccicheck script. Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
-rw-r--r--drivers/iommu/amd_iommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index a1585796785b..f82060e778a2 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -1835,8 +1835,8 @@ static void free_gcr3_table(struct protection_domain *domain)
free_gcr3_tbl_level2(domain->gcr3_tbl);
else if (domain->glx == 1)
free_gcr3_tbl_level1(domain->gcr3_tbl);
- else if (domain->glx != 0)
- BUG();
+ else
+ BUG_ON(domain->glx != 0);
free_page((unsigned long)domain->gcr3_tbl);
}