Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754572AbbHXMNz (ORCPT ); Mon, 24 Aug 2015 08:13:55 -0400 Received: from helcar.hengli.com.au ([209.40.204.226]:42760 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752904AbbHXMNx (ORCPT ); Mon, 24 Aug 2015 08:13:53 -0400 Date: Mon, 24 Aug 2015 20:13:12 +0800 From: Herbert Xu To: Julia Lawall Cc: Steffen Klassert , kernel-janitors@vger.kernel.org, "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 10/11] ah6: fix error return code Message-ID: <20150824121312.GA30248@gondor.apana.org.au> References: <1440288682-12732-1-git-send-email-Julia.Lawall@lip6.fr> <1440288682-12732-11-git-send-email-Julia.Lawall@lip6.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1440288682-12732-11-git-send-email-Julia.Lawall@lip6.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1061 Lines: 42 On Sun, Aug 23, 2015 at 02:11:21AM +0200, Julia Lawall wrote: > Return a negative error code on failure. > > A simplified version of the semantic match that finds this problem is as > follows: (http://coccinelle.lip6.fr/) > > // > @@ > identifier ret; expression e1,e2; > @@ > ( > if (\(ret < 0\|ret != 0\)) > { ... return ret; } > | > ret = 0 > ) > ... when != ret = e1 > when != &ret > *if(...) > { > ... when != ret = e2 > when forall > return ret; > } > // > > Signed-off-by: Julia Lawall Acked-by: Herbert Xu This problem exists in net/ipv4/ah4.c too, right? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/