[SRU][Xenial] UBUNTU: SAUCE: powerpc/fadump: fix wrong function return in the backport

Kleber Sacilotto de Souza kleber.souza at canonical.com
Tue Oct 2 13:25:12 UTC 2018

BugLink: https://bugs.launchpad.net/bugs/1792419

The 4.4.y stable backport c9fadf27006b for upstream commit 1bd6a1c4b80a
("powerpc/fadump: handle crash memory ranges array index overflow")
introduces a build failure on ppc by returning a int in a void function.
In 4.4.y register_fadump() returns void because 98b8cd7f7564
("powerpc/fadump: Return error when fadump registration fails") hasn't
been backported for this stable release.

Fixes: c9fadf27006b ("powerpc/fadump: handle crash memory ranges array index overflow")
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
 arch/powerpc/kernel/fadump.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 4e71df4048a9..69c8090e5399 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -1001,7 +1001,6 @@ static void register_fadump(void)
 	unsigned long addr;
 	void *vaddr;
-	int ret;
 	 * If no memory is reserved then we can not register for firmware-
@@ -1010,9 +1009,8 @@ static void register_fadump(void)
 	if (!fw_dump.reserve_dump_area_size)
-	ret = fadump_setup_crash_memory_ranges();
-	if (ret)
-		return ret;
+	if (fadump_setup_crash_memory_ranges())
+		return;
 	addr = be64_to_cpu(fdm.rmr_region.destination_address) + be64_to_cpu(fdm.rmr_region.source_len);
 	/* Initialize fadump crash info header. */

More information about the kernel-team mailing list