Skip to contentSkip to conversation

fix odd_ptr_err.cocci warnings (fwd)

PATCH New Julia Lawall 1 participant 1 message Dec 23, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix odd_ptr_err.cocci warnings (fwd)

PTR_ERR should access the value just tested by IS_ERR

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

---

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(-)
net/sunrpc/auth_gss/auth_gss.c +1 -1
@@ -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);