summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-11-19 11:32:41 +0800
committerBen Hutchings <ben@decadent.org.uk>2019-02-11 17:54:06 +0000
commit69e75428fc8a7d5caea323edf510880bac8d6dcc (patch)
treee2480c8aac16e008aee40927be12d4a542214c3d /fs
parenta0d0d8dfff72995c0a6db3ef107ca3136236f32f (diff)
exportfs: fix 'passing zero to ERR_PTR()' warning
commit 909e22e05353a783c526829427e9a8de122fba9c upstream. 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: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/exportfs/expfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index a3aa6baad1a1..1939315d1b5a 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -148,6 +148,7 @@ static struct dentry *reconnect_one(struct vfsmount *mnt,
mutex_unlock(&parent->d_inode->i_mutex);
if (IS_ERR(tmp)) {
dprintk("%s: lookup failed: %d\n", __func__, PTR_ERR(tmp));
+ err = PTR_ERR(tmp);
goto out_err;
}
if (tmp != dentry) {