lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <5b95806a-e72e-4d05-9db8-104be645e6e5@web.de>
Date: Wed, 8 Oct 2025 22:02:24 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
 Bharath SM <bharathsm@...rosoft.com>, Paulo Alcantara <pc@...guebit.org>,
 Ronnie Sahlberg <ronniesahlberg@...il.com>,
 Shyam Prasad N <sprasad@...rosoft.com>, Steve French <sfrench@...ba.org>,
 Tom Talpey <tom@...pey.com>
Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org
Subject: [PATCH] smb: client: Simplify a return statement in
 get_smb2_acl_by_path()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Wed, 8 Oct 2025 21:56:34 +0200

Return an error pointer without referencing another local variable
in an if branch of this function implementation.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 fs/smb/client/smb2ops.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c
index 7c3e96260fd4..bb5eda032aa4 100644
--- a/fs/smb/client/smb2ops.c
+++ b/fs/smb/client/smb2ops.c
@@ -3216,9 +3216,8 @@ get_smb2_acl_by_path(struct cifs_sb_info *cifs_sb,
 
 	utf16_path = cifs_convert_path_to_utf16(path, cifs_sb);
 	if (!utf16_path) {
-		rc = -ENOMEM;
 		free_xid(xid);
-		return ERR_PTR(rc);
+		return ERR_PTR(-ENOMEM);
 	}
 
 	oparms = (struct cifs_open_parms) {
-- 
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ