Skip to content

Commit bfe4ab9

Browse files
YuryNorovtsbogend
authored andcommitted
MIPS: SGI-IP27: use WARN_ON() output
WARN_ON() propagates the result of conditional expression, and it can be used to return early in the following expression in the arch_init_irq(). This is a no-op cleanup, except that compiler may optimize the error paths better because WARN_ON() implies 'unlikely()'. Signed-off-by: Yury Norov <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 156e649 commit bfe4ab9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

arch/mips/sgi-ip27/ip27-irq.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,13 +289,12 @@ void __init arch_init_irq(void)
289289
bitmap_set(hub_irq_map, NI_BRDCAST_ERR_A, MSC_PANIC_INTR - NI_BRDCAST_ERR_A + 1);
290290

291291
fn = irq_domain_alloc_named_fwnode("HUB");
292-
WARN_ON(fn == NULL);
293-
if (!fn)
292+
if (WARN_ON(fn == NULL))
294293
return;
294+
295295
domain = irq_domain_create_linear(fn, IP27_HUB_IRQ_COUNT,
296296
&hub_domain_ops, NULL);
297-
WARN_ON(domain == NULL);
298-
if (!domain)
297+
if (WARN_ON(domain == NULL))
299298
return;
300299

301300
irq_set_default_host(domain);

0 commit comments

Comments
 (0)