diff options
author | Yuesong Li <liyuesong@vivo.com> | 2024-08-29 19:52:41 +0800 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-09-15 10:42:44 -0500 |
commit | 9290038be2f91917d384b48f85665c4498c378f3 (patch) | |
tree | b62230f226f9545a266f7d4122a115566ff4be2b /fs | |
parent | e2fcd3fa0351ea2133d1238fcc6a9f140c52d36f (diff) |
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 <liyuesong@vivo.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/smb/client/connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c index 5375b0c1dfb9..098d51d0044c 100644 --- a/fs/smb/client/connect.c +++ b/fs/smb/client/connect.c @@ -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; } |