Skip to contentSkip to conversation

kernfs/file.c: remove redundant error return counter assignment

PATCH New Lin Feng 1 participant 1 message Jun 17, 2022 kernfs

lore
Share & tools
lore

Lin Feng

author
#0 lore raw

PATCH 1/1 kernfs/file.c: remove redundant error return counter assignment

Since previous 'rc = -EINVAL;', rc value doesn't change, so not necessary to re-assign it again.

---
 fs/kernfs/file.c | 1 -
 1 file changed, 1 deletion(-)
fs/kernfs/file.c +0 -1
index e3abfa843879..54b2a13ac9a2 100644
@@ -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;
 
Signature · 1 line
2.31.1