lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 19 Jan 2020 14:09:33 +0100
From:   mateusznosek0@...il.com
To:     linux-kernel@...r.kernel.org
Cc:     Mateusz Nosek <mateusznosek0@...il.com>,
        dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
        tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
        x86@...nel.org
Subject: [PATCH] arch/x86/mm/mpx.c: Clean up code by removing unnecessary assignment

From: Mateusz Nosek <mateusznosek0@...il.com>

Previously variable 'ret' is assigned just before return instruction.
The variable is local so this assignment is useless
and therefore can be removed.

Signed-off-by: Mateusz Nosek <mateusznosek0@...il.com>
---
 arch/x86/mm/mpx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/x86/mm/mpx.c b/arch/x86/mm/mpx.c
index 895fb7a9294d..30ab444301f5 100644
--- a/arch/x86/mm/mpx.c
+++ b/arch/x86/mm/mpx.c
@@ -827,10 +827,8 @@ static int try_unmap_single_bt(struct mm_struct *mm,
 	/*
 	 * No bounds table there, so nothing to unmap.
 	 */
-	if (ret == -ENOENT) {
-		ret = 0;
+	if (ret == -ENOENT)
 		return 0;
-	}
 	if (ret)
 		return ret;
 	/*
-- 
2.17.1

Powered by blists - more mailing lists