mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
smb: client: Return a status code only as a constant in sid_to_id()
Return a status code without storing it in an intermediate variable. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
3a86608788
commit
b9ce79887e
|
|
@ -339,7 +339,6 @@ int
|
|||
sid_to_id(struct cifs_sb_info *cifs_sb, struct smb_sid *psid,
|
||||
struct cifs_fattr *fattr, uint sidtype)
|
||||
{
|
||||
int rc = 0;
|
||||
struct key *sidkey;
|
||||
char *sidstr;
|
||||
const struct cred *saved_cred;
|
||||
|
|
@ -446,12 +445,12 @@ sid_to_id(struct cifs_sb_info *cifs_sb, struct smb_sid *psid,
|
|||
* fails then we just fall back to using the ctx->linux_uid/linux_gid.
|
||||
*/
|
||||
got_valid_id:
|
||||
rc = 0;
|
||||
if (sidtype == SIDOWNER)
|
||||
fattr->cf_uid = fuid;
|
||||
else
|
||||
fattr->cf_gid = fgid;
|
||||
return rc;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user