summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@cjr.nz>2023-01-18 13:36:31 -0300
committerSteve French <stfrench@microsoft.com>2023-01-18 11:24:20 -0600
commitd6a49e8c4ca4d399ed65ac219585187fc8c2e2b1 (patch)
treedda905e6d06dbb94c2435be499019cd03f1fb20b /fs
parent3deddb77fdd932df92f3b6a27a9cffed82c4fe1a (diff)
downloadlinux-rpi-d6a49e8c4ca4d399ed65ac219585187fc8c2e2b1.tar.gz
linux-rpi-d6a49e8c4ca4d399ed65ac219585187fc8c2e2b1.tar.bz2
linux-rpi-d6a49e8c4ca4d399ed65ac219585187fc8c2e2b1.zip
cifs: fix return of uninitialized rc in dfs_cache_update_tgthint()
Fix this by initializing rc to 0 as cache_refresh_path() would not set it in case of success. Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/all/202301190004.bEHvbKG6-lkp@intel.com/ Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/dfs_cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
index 308101d90006..e16c63997133 100644
--- a/fs/cifs/dfs_cache.c
+++ b/fs/cifs/dfs_cache.c
@@ -1047,10 +1047,10 @@ int dfs_cache_update_tgthint(const unsigned int xid, struct cifs_ses *ses,
const struct nls_table *cp, int remap, const char *path,
const struct dfs_cache_tgt_iterator *it)
{
- int rc;
- const char *npath;
- struct cache_entry *ce;
struct cache_dfs_tgt *t;
+ struct cache_entry *ce;
+ const char *npath;
+ int rc = 0;
npath = dfs_cache_canonical_path(path, cp, remap);
if (IS_ERR(npath))