Skip to contentSkip to conversation

smb: client: Delete duplicate error code assignments in cifs_xattr_set()

PATCH New Markus Elfring 1 participant 1 message Oct 10, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smb: client: Delete duplicate error code assignments in cifs_xattr_set()

From: Markus Elfring <[email protected]>
Date: Fri, 10 Oct 2025 14:10:22 +0200

The local variable “rc” is initialised with an error code. Thus omit two repeated assignment statements according to this value.

---
 fs/smb/client/xattr.c | 3 ---
 1 file changed, 3 deletions(-)
fs/smb/client/xattr.c +0 -3
index b88fa04f5792..a74d12d36176 100644
@@ -127,7 +127,6 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
 		returns as xattrs */
 	if (size > MAX_EA_VALUE_SIZE) {
 		cifs_dbg(FYI, "size of EA value too large\n");
-		rc = -EOPNOTSUPP;
 		goto out;
 	}
 
@@ -206,8 +205,6 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
 
 				rc = pTcon->ses->server->ops->set_acl(pacl,
 					size, inode, full_path, aclflags);
-			} else {
-				rc = -EOPNOTSUPP;
 			}
 			if (rc == 0) /* force revalidate of the inode */
 				CIFS_I(inode)->time = 0;
Signature · 1 line
2.51.0