lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1563266630-6471-1-git-send-email-dingxiang@cmss.chinamobile.com>
Date:   Tue, 16 Jul 2019 16:43:50 +0800
From:   Ding Xiang <dingxiang@...s.chinamobile.com>
To:     trond.myklebust@...merspace.com, anna.schumaker@...app.com
Cc:     linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] NFS: fix 'passing zero to PTR_ERR()' warning

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@...s.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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ