Fix a static code checker warning: fs/nfs/nfs4idmap.c:331 nfs_idmap_get_key() warn: passing zero to 'PTR_ERR' Signed-off-by: Ding Xiang <dingxiang@xxxxxxxxxxxxxxxxxxxx> --- fs/nfs/nfs4idmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4idmap.c b/fs/nfs/nfs4idmap.c index 1e72963..f71bb7f 100644 --- a/fs/nfs/nfs4idmap.c +++ b/fs/nfs/nfs4idmap.c @@ -328,7 +328,7 @@ static ssize_t nfs_idmap_get_key(const char *name, size_t namelen, payload = user_key_payload_rcu(rkey); if (IS_ERR_OR_NULL(payload)) { - ret = PTR_ERR(payload); + ret = PTR_ERR_OR_ZERO(payload); goto out_up; } -- 1.9.1