* [PATCH] kernfs/file.c: remove redundant error return counter assignment
@ 2022-06-17 9:17 Lin Feng
0 siblings, 0 replies; only message in thread
From: Lin Feng @ 2022-06-17 9:17 UTC (permalink / raw)
To: gregkh, tj; +Cc: linux-kernel, linf
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-17 9:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-17 9:17 [PATCH] kernfs/file.c: remove redundant error return counter assignment Lin Feng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®