lkml.org 
[lkml]   [2022]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] kernfs/file.c: remove redundant error return counter assignment
Date
Since previous 'rc = -EINVAL;', rc value doesn't change, so not
necessary to re-assign it again.

Signed-off-by: Lin Feng <linf@wangsu.com>
---
fs/kernfs/file.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index e3abfa843879..54b2a13ac9a2 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -484,7 +484,6 @@ static int kernfs_fop_mmap(struct file *file, struct vm_area_struct *vma)
* It is not possible to successfully wrap close.
* So error if someone is trying to use close.
*/
- rc = -EINVAL;
if (vma->vm_ops && vma->vm_ops->close)
goto out_put;

--
2.31.1
\
 
 \ /
  Last update: 2022-06-17 11:19    [W:0.037 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site