From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:5940 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753320AbcLWT2D (ORCPT ); Fri, 23 Dec 2016 14:28:03 -0500 Date: Fri, 23 Dec 2016 20:27:13 +0100 (CET) From: Julia Lawall To: andros@netapp.com cc: anna.schumaker@netapp.com, bfieldses.org@netapp.com, linux-nfs@vger.kernel.org, kbuild-all@01.org Subject: [PATCH] fix odd_ptr_err.cocci warnings (fwd) Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-nfs-owner@vger.kernel.org List-ID: PTR_ERR should access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci CC: Andy Adamson Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- 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(-) --- 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);