[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211124115702.467765244@linuxfoundation.org>
Date: Wed, 24 Nov 2021 12:57:12 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Paul Mundt <lethal@...ux-sh.org>,
Guenter Roeck <linux@...ck-us.net>,
Nick Desaulniers <ndesaulniers@...gle.com>,
John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
Miguel Ojeda <ojeda@...nel.org>, Rich Felker <dalias@...c.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 4.4 129/162] sh: check return code of request_irq
From: Nick Desaulniers <ndesaulniers@...gle.com>
[ Upstream commit 0e38225c92c7964482a8bb6b3e37fde4319e965c ]
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 <miguel.ojeda.sandonis@...il.com>
Cc: Paul Mundt <lethal@...ux-sh.org>
Reported-by: Guenter Roeck <linux@...ck-us.net>
Signed-off-by: Nick Desaulniers <ndesaulniers@...gle.com>
Tested-by: John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>
Reviewed-by: Miguel Ojeda <ojeda@...nel.org>
Signed-off-by: Rich Felker <dalias@...c.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
arch/sh/kernel/cpu/sh4a/smp-shx3.c | 5 +++--
1 file 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 4a298808789c4..4a1cee5da2dc5 100644
--- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
@@ -78,8 +78,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);
--
2.33.0
Powered by blists - more mailing lists