um: Replace if (cond) BUG() with BUG_ON()

Fix the following coccinelle reports:
./arch/um/kernel/mem.c:77:3-6: WARNING: Use BUG_ON instead of if
condition followed by BUG.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
Yang Li 2021-03-17 15:11:36 +08:00 committed by Richard Weinberger
parent ad3d199116
commit 24271ffed7

View file

@ -73,8 +73,7 @@ static void __init one_page_table_init(pmd_t *pmd)
set_pmd(pmd, __pmd(_KERNPG_TABLE +
(unsigned long) __pa(pte)));
if (pte != pte_offset_kernel(pmd, 0))
BUG();
BUG_ON(pte != pte_offset_kernel(pmd, 0));
}
}