Skip to contentSkip to conversation

x86/crash: remove unnecessary comparison

PATCH New Nikolas Nyby 2 participants 2 messages Jul 24, 2019 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/crash: remove unnecessary comparison

This ret comparison and return are unnecessary as of f296f2634920d205b93d878b48d87bb7e0a4c256

elf_header_exclude_ranges() returns ret in any case, with or without this comparison.

---
 arch/x86/kernel/crash.c | 2 --
 1 file changed, 2 deletions(-)
arch/x86/kernel/crash.c +0 -2
index 2bf70a2fed90..eb651fbde92a 100644
@@ -225,8 +225,6 @@ static int elf_header_exclude_ranges(struct crash_mem *cmem)
 	if (crashk_low_res.end) {
 		ret = crash_exclude_mem_range(cmem, crashk_low_res.start,
 							crashk_low_res.end);
-		if (ret)
-			return ret;
 	}
 
 	return ret;
Signature · 1 line
2.20.1
#1 lore raw

[tip:x86/cleanups] x86/crash: Remove unnecessary comparison

x86/crash: Remove unnecessary comparison
Commit-ID:  4599c6671b8119ed5455e4ed6b967b461c27a9f7
Gitweb:     https://git.kernel.org/tip/4599c6671b8119ed5455e4ed6b967b461c27a9f7
Author:     Nikolas Nyby <[email protected]>
AuthorDate: Wed, 24 Jul 2019 00:13:37 -0400
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 24 Jul 2019 16:50:15 +0200

x86/crash: Remove unnecessary comparison

The ret comparison and return are unnecessary as of commit f296f2634920 ("x86/kexec: Remove walk_iomem_res() call with GART type")

elf_header_exclude_ranges() returns ret in any case, with or without this comparison.

[ tglx: Use a proper commit reference instead of full SHA ]

---
 arch/x86/kernel/crash.c | 2 --
 1 file changed, 2 deletions(-)
arch/x86/kernel/crash.c +0 -2
index 2bf70a2fed90..eb651fbde92a 100644
@@ -225,8 +225,6 @@ static int elf_header_exclude_ranges(struct crash_mem *cmem)
 	if (crashk_low_res.end) {
 		ret = crash_exclude_mem_range(cmem, crashk_low_res.start,
 							crashk_low_res.end);
-		if (ret)
-			return ret;
 	}
 
 	return ret;