Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752681AbbDEU5l (ORCPT ); Sun, 5 Apr 2015 16:57:41 -0400 Received: from cantor2.suse.de ([195.135.220.15]:41900 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752010AbbDEU5k (ORCPT ); Sun, 5 Apr 2015 16:57:40 -0400 Date: Sun, 5 Apr 2015 22:57:37 +0200 (CEST) From: Jiri Kosina To: Julia Lawall cc: kernel-janitors@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 9/16] HID: logitech-hidpp: fix error return code In-Reply-To: <1428235596-4757-10-git-send-email-Julia.Lawall@lip6.fr> Message-ID: References: <1428235596-4757-1-git-send-email-Julia.Lawall@lip6.fr> <1428235596-4757-10-git-send-email-Julia.Lawall@lip6.fr> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 837 Lines: 39 On Sun, 5 Apr 2015, 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 Applied to for-4.1/logitech, thanks. -- Jiri Kosina SUSE Labs -- 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/