summaryrefslogtreecommitdiff
path: root/fs/smb/client/fscache.c
diff options
context:
space:
mode:
authorKatya Orlova <e.orlova@ispras.ru>2023-08-15 16:38:31 +0300
committerSteve French <stfrench@microsoft.com>2023-08-30 23:38:49 -0500
commitefc0b0bcffcba60d9c6301063d25a22a4744b499 (patch)
treed3064d0c428714baad455cf12bc164ed92549a4e /fs/smb/client/fscache.c
parentb97d64c722598ffed42ece814a2cb791336c6679 (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.c2
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);