Re: [PATCH] smb: client: Simplify a return statement in get_smb2_acl_by_path()

From: Markus Elfring
Date: Thu Oct 09 2025 - 11:45:29 EST


> As pointed out by the kernel test robot a few minutes ago, this patch
> would introduce a regression (uninitialized rc variable in free_xid
> macro), so will remove this patch from for-next.

Will this (clang) compiler report be reconsidered once more under other circumstances?


…>> +++ 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) {
…

Can it be that the uninitialized rc variable would not really matter for
the adjusted statements in such an if branch?

Regards,
Markus