lkml.org 
[lkml]   [2019]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] NFS: fix 'passing zero to PTR_ERR()' warning
Date
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@cmss.chinamobile.com>
---
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


\
 
 \ /
  Last update: 2019-07-16 10:45    [W:0.021 / U:0.596 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site