Skip to contentSkip to conversation

mm-shmemc-clean-code-by-removing-unnecessary-assignment.patch removed from -mm tree

merged [email protected] 1 participant 1 message Apr 8, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/shmem.c: clean code by removing unnecessary assignment
has been removed from the -mm tree. Its filename was
mm-shmemc-clean-code-by-removing-unnecessary-assignment.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Mateusz Nosek <[email protected]>
Subject: mm/shmem.c: clean code by removing unnecessary assignment

Previously 0 was assigned to variable 'error' but the variable was never read before reassignemnt later. So the assignment can be removed.

---

 mm/shmem.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
mm/shmem.c renamed from mm/shmem.c~mm-shmemc-clean-code-by-removing-unnecessary-assignment +3 -6
@@ -3120,12 +3120,9 @@ static int shmem_symlink(struct inode *d
 
 	error = security_inode_init_security(inode, dir, &dentry->d_name,
 					     shmem_initxattrs, NULL);
-	if (error) {
-		if (error != -EOPNOTSUPP) {
-			iput(inode);
-			return error;
-		}
-		error = 0;
+	if (error && error != -EOPNOTSUPP) {
+		iput(inode);
+		return error;
 	}
 
 	inode->i_size = len-1;

_

Patches currently in -mm which might be from [email protected] are