Skip to content

Commit 8982756

Browse files
swahlhpehansendc
authored andcommitted
x86/platform/uv: Remove remaining BUG_ON() and BUG() calls
Replace BUG and BUG_ON with WARN_ON_ONCE and carry on as best as we can. Signed-off-by: Steve Wahl <[email protected]> Signed-off-by: Dave Hansen <[email protected]> Link: https://lore.kernel.org/all/20230519190752.3297140-8-steve.wahl%40hpe.com
1 parent 8a50c58 commit 8982756

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/x86/kernel/apic/x2apic_uv_x.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,8 @@ static __init void build_uv_gr_table(void)
617617

618618
bytes = _gr_table_len * sizeof(struct uv_gam_range_s);
619619
grt = kzalloc(bytes, GFP_KERNEL);
620-
BUG_ON(!grt);
620+
if (WARN_ON_ONCE(!grt))
621+
return;
621622
_gr_table = grt;
622623

623624
for (; gre->type != UV_GAM_RANGE_TYPE_UNUSED; gre++) {
@@ -1548,7 +1549,8 @@ static void __init build_socket_tables(void)
15481549
return;
15491550
}
15501551
pr_err("UV: Error: UVsystab address translations not available!\n");
1551-
BUG();
1552+
WARN_ON_ONCE(!gre);
1553+
return;
15521554
}
15531555

15541556
numn = num_possible_nodes();

0 commit comments

Comments
 (0)