aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Desaulniers <[email protected]>2020-12-22 12:54:01 -0800
committerRich Felker <[email protected]>2021-09-17 13:59:59 -0400
commit0e38225c92c7964482a8bb6b3e37fde4319e965c (patch)
treee9bf376d2938b8c37c40800af0a0df5c3f224254
parentca42bc4b7bda7c6d68f1cc97c27fc8ff7385c4c7 (diff)
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: c7936b9abcf5 ("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]>
-rw-r--r--arch/sh/kernel/cpu/sh4a/smp-shx3.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/smp-shx3.c b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
index f8a2bec0f260..1261dc7b84e8 100644
--- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
@@ -73,8 +73,9 @@ static void shx3_prepare_cpus(unsigned int max_cpus)
BUILD_BUG_ON(SMP_MSG_NR >= 8);
for (i = 0; i < SMP_MSG_NR; i++)
- request_irq(104 + i, ipi_interrupt_handler,
- IRQF_PERCPU, "IPI", (void *)(long)i);
+ if (request_irq(104 + i, ipi_interrupt_handler,
+ IRQF_PERCPU, "IPI", (void *)(long)i))
+ pr_err("Failed to request irq %d\n", i);
for (i = 0; i < max_cpus; i++)
set_cpu_present(i, true);