Commit efc0b0bc authored by Katya Orlova's avatar Katya Orlova Committed by Steve French

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: 70431bfd ("cifs: Support fscache indexing rewrite")
Signed-off-by: default avatarKatya Orlova <e.orlova@ispras.ru>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent b97d64c7
......@@ -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);
......
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