[PATCH] ipc/shm.c: removed 'int err' from shm_get_policy()

From: danielijrobson
Date: Sun Nov 18 2018 - 18:50:40 EST


From: Daniel Robson <danielijrobson@xxxxxxxxx>

removed unneeded variable in shm_get_policy()

Signed-off-by: Daniel Robson <danielijrobson@xxxxxxxxx>
---
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