[PATCH] NFS: fix 'passing zero to PTR_ERR()' warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux