Skip to content

Commit 0e38225

Browse files
nickdesaulniersRich Felker
authored andcommitted
sh: check return code of request_irq
request_irq is marked __must_check, but the call in shx3_prepare_cpus has a void return type, so it can't propagate failure to the caller. Follow cues from hexagon and just print an error. Fixes: c7936b9 ("sh: smp: Hook in to the generic IPI handler for SH-X3 SMP.") Cc: Miguel Ojeda <[email protected]> Cc: Paul Mundt <[email protected]> Reported-by: Guenter Roeck <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Tested-by: John Paul Adrian Glaubitz <[email protected]> Reviewed-by: Miguel Ojeda <[email protected]> Signed-off-by: Rich Felker <[email protected]>
1 parent ca42bc4 commit 0e38225

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/sh/kernel/cpu/sh4a/smp-shx3.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ static void shx3_prepare_cpus(unsigned int max_cpus)
7373
BUILD_BUG_ON(SMP_MSG_NR >= 8);
7474

7575
for (i = 0; i < SMP_MSG_NR; i++)
76-
request_irq(104 + i, ipi_interrupt_handler,
77-
IRQF_PERCPU, "IPI", (void *)(long)i);
76+
if (request_irq(104 + i, ipi_interrupt_handler,
77+
IRQF_PERCPU, "IPI", (void *)(long)i))
78+
pr_err("Failed to request irq %d\n", i);
7879

7980
for (i = 0; i < max_cpus; i++)
8081
set_cpu_present(i, true);

0 commit comments

Comments
 (0)