exportfs: fix 'passing zero to ERR_PTR()' warning
authorYueHaibing <yuehaibing@huawei.com>
Mon, 19 Nov 2018 03:32:41 +0000 (11:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:02 +0000 (14:50 +0100)
commit296f9d916cb592c933e6f6aad6c3026bfcb45a97
tree60f0017a8924d3b7e89338061ff0d3242d529ead
parentfa3302ef721f6daa80baac04bcd30110391e82e5
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>
fs/exportfs/expfs.c