diff mbox

fix odd_ptr_err.cocci warnings (fwd)

Message ID alpine.DEB.2.20.1612232025300.2012@hadrien (mailing list archive)
State New, archived
Headers show

Commit Message

Julia Lawall Dec. 23, 2016, 7:27 p.m. UTC
PTR_ERR should access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

CC: Andy Adamson <andros@netapp.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

I haven't looked at the context in detail, but the change looks plausible.

url:
https://github.com/0day-ci/linux/commits/andros-netapp-com/RFC-RPCSEC_GSS-Version-3-prototype-Full-Mode-MAC/20161224-014029
base:   git://linux-nfs.org/~bfields/linux.git nfsd-next
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago

 auth_gss.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -1939,7 +1939,7 @@  gss3_create_label(struct rpc_cred *cred)

 	g3a = gss3_alloc_init_assertion(&cres);
 	if (IS_ERR(g3a)) {
-		ret = PTR_ERR(task);
+		ret = PTR_ERR(g3a);
 		goto out_free_assert;
 	}
 	gss3_insert_assertion(&ctx->gc_alist, g3a);