diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-11-19 06:32:41 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-29 12:24:03 +0300 |
commit | 32cdacb10a28a94aed882fca30c7aa1ebfb82ac5 (patch) | |
tree | 978c5e68bbc326a8bb71234efdb5c4e6dc424c7d /fs | |
parent | a3f01dcd7656af69547f625fa15dad230b890567 (diff) | |
download | linux-32cdacb10a28a94aed882fca30c7aa1ebfb82ac5.tar.xz |
exportfs: fix 'passing zero to ERR_PTR()' warning
[ Upstream commit 909e22e05353a783c526829427e9a8de122fba9c ]
Fix a static code checker warning:
fs/exportfs/expfs.c:171 reconnect_one() warn: passing zero to 'ERR_PTR'
The error path for lookup_one_len_unlocked failure
should set err to PTR_ERR.
Fixes: bbf7a8a3562f ("exportfs: move most of reconnect_path to helper function")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/exportfs/expfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index 3706939e5dd5..1730122b10e0 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c @@ -146,6 +146,7 @@ static struct dentry *reconnect_one(struct vfsmount *mnt, tmp = lookup_one_len_unlocked(nbuf, parent, strlen(nbuf)); if (IS_ERR(tmp)) { dprintk("%s: lookup failed: %d\n", __func__, PTR_ERR(tmp)); + err = PTR_ERR(tmp); goto out_err; } if (tmp != dentry) { |