Skip to content

Commit d6a49e8

Browse files
Paulo AlcantaraSteve French
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 3deddb7 commit d6a49e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/cifs/dfs_cache.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,10 +1047,10 @@ int dfs_cache_update_tgthint(const unsigned int xid, struct cifs_ses *ses,
10471047
const struct nls_table *cp, int remap, const char *path,
10481048
const struct dfs_cache_tgt_iterator *it)
10491049
{
1050-
int rc;
1051-
const char *npath;
1052-
struct cache_entry *ce;
10531050
struct cache_dfs_tgt *t;
1051+
struct cache_entry *ce;
1052+
const char *npath;
1053+
int rc = 0;
10541054

10551055
npath = dfs_cache_canonical_path(path, cp, remap);
10561056
if (IS_ERR(npath))

0 commit comments

Comments
 (0)