lkml.org 
[lkml]   [2018]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ipc/shm.c: removed 'int err' from shm_get_policy()
Date
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
\
 
 \ /
  Last update: 2018-11-19 00:51    [W:0.044 / U:39.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site