From: danielijrobson@gmail.com
To: danielijrobson@gmail.com
Cc: akpm@linux-foundation.org, dbueso@suse.de,
manfred@colorfullife.com, ebiederm@xmission.com,
mike.kravetz@oracle.com, linux@dominikbrodowski.net,
viro@zeniv.linux.org.uk, ebiggers@google.com, arnd@arndb.de,
linux-kernel@vger.kernel.org
Subject: [PATCH] ipc/shm.c: removed 'int err' from shm_get_policy()
Date: Sun, 18 Nov 2018 23:49:11 +0000 [thread overview]
Message-ID: <20181118234911.17697-1-danielijrobson@gmail.com> (raw)
From: Daniel Robson <danielijrobson@gmail.com>
removed unneeded variable in shm_get_policy()
Signed-off-by: Daniel Robson <danielijrobson@gmail.com>
---
ipc/shm.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/ipc/shm.c b/ipc/shm.c
index 0842411cb0e9..2cb493214108 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -461,11 +461,10 @@ static int shm_set_policy(struct vm_area_struct *vma, struct mempolicy *new)
{
struct file *file = vma->vm_file;
struct shm_file_data *sfd = shm_file_data(file);
- int err = 0;
if (sfd->vm_ops->set_policy)
- err = sfd->vm_ops->set_policy(vma, new);
- return err;
+ return sfd->vm_ops->set_policy(vma, new);
+ return 0;
}
static struct mempolicy *shm_get_policy(struct vm_area_struct *vma,
--
2.18.0
next reply other threads:[~2018-11-18 23:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-18 23:49 danielijrobson [this message]
2018-11-22 5:07 ` [PATCH] ipc/shm.c: removed 'int err' from shm_get_policy() Andrew Morton
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=20181118234911.17697-1-danielijrobson@gmail.com \
--to=danielijrobson@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dbueso@suse.de \
--cc=ebiederm@xmission.com \
--cc=ebiggers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=manfred@colorfullife.com \
--cc=mike.kravetz@oracle.com \
--cc=viro@zeniv.linux.org.uk \
/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).