Skip to content

Commit 9290038

Browse files
Yuesong Lismfrench
authored andcommitted
cifs: convert to use ERR_CAST()
Use ERR_CAST() as it is designed for casting an error pointer to another type. This macro uses the __force and __must_check modifiers, which are used to tell the compiler to check for errors where this macro is used. Signed-off-by: Yuesong Li <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent e2fcd3f commit 9290038

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/client/connect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4081,7 +4081,7 @@ __cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid)
40814081

40824082
ses = cifs_get_smb_ses(master_tcon->ses->server, ctx);
40834083
if (IS_ERR(ses)) {
4084-
tcon = (struct cifs_tcon *)ses;
4084+
tcon = ERR_CAST(ses);
40854085
cifs_put_tcp_session(master_tcon->ses->server, 0);
40864086
goto out;
40874087
}

0 commit comments

Comments
 (0)