From: mateusznosek0@gmail.com
To: linux-kernel@vger.kernel.org
Cc: Mateusz Nosek <mateusznosek0@gmail.com>,
dave.hansen@linux.intel.com, luto@kernel.org,
peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, hpa@zytor.com, x86@kernel.org
Subject: [PATCH] arch/x86/mm/mpx.c: Clean up code by removing unnecessary assignment
Date: Sun, 19 Jan 2020 14:09:33 +0100 [thread overview]
Message-ID: <20200119130933.12228-1-mateusznosek0@gmail.com> (raw)
From: Mateusz Nosek <mateusznosek0@gmail.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@gmail.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
next reply other threads:[~2020-01-19 13:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-19 13:09 mateusznosek0 [this message]
2020-01-22 13:10 ` [PATCH] arch/x86/mm/mpx.c: Clean up code by removing unnecessary assignment Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200119130933.12228-1-mateusznosek0@gmail.com \
--to=mateusznosek0@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).