Commit 9290038b authored by Yuesong Li's avatar Yuesong Li Committed by Steve French

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: default avatarYuesong Li <liyuesong@vivo.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent e2fcd3fa
......@@ -4081,7 +4081,7 @@ __cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid)
ses = cifs_get_smb_ses(master_tcon->ses->server, ctx);
if (IS_ERR(ses)) {
tcon = (struct cifs_tcon *)ses;
tcon = ERR_CAST(ses);
cifs_put_tcp_session(master_tcon->ses->server, 0);
goto out;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment