diff options
author | Katya Orlova <e.orlova@ispras.ru> | 2023-08-15 16:38:31 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-08-30 23:38:49 -0500 |
commit | efc0b0bcffcba60d9c6301063d25a22a4744b499 (patch) | |
tree | d3064d0c428714baad455cf12bc164ed92549a4e /fs/smb/client/fscache.c | |
parent | b97d64c722598ffed42ece814a2cb791336c6679 (diff) |
smb: propagate error code of extract_sharename()
In addition to the EINVAL, there may be an ENOMEM.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 70431bfd825d ("cifs: Support fscache indexing rewrite")
Signed-off-by: Katya Orlova <e.orlova@ispras.ru>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/fscache.c')
-rw-r--r-- | fs/smb/client/fscache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/client/fscache.c b/fs/smb/client/fscache.c index 3677525ee993..e5cad149f5a2 100644 --- a/fs/smb/client/fscache.c +++ b/fs/smb/client/fscache.c @@ -48,7 +48,7 @@ int cifs_fscache_get_super_cookie(struct cifs_tcon *tcon) sharename = extract_sharename(tcon->tree_name); if (IS_ERR(sharename)) { cifs_dbg(FYI, "%s: couldn't extract sharename\n", __func__); - return -EINVAL; + return PTR_ERR(sharename); } slen = strlen(sharename); |