Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752789AbbDEXXP (ORCPT ); Sun, 5 Apr 2015 19:23:15 -0400 Received: from mga01.intel.com ([192.55.52.88]:60464 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752576AbbDEXXN (ORCPT ); Sun, 5 Apr 2015 19:23:13 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,529,1422950400"; d="scan'208";a="551381989" Date: Mon, 6 Apr 2015 01:23:09 +0200 From: Samuel Ortiz To: Julia Lawall Cc: Lauro Ramos Venancio , kernel-janitors@vger.kernel.org, Aloisio Almeida Jr , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 16/16] NFC: pn533: fix error return code Message-ID: <20150405232309.GC12567@ribalta.home> References: <1428235596-4757-1-git-send-email-Julia.Lawall@lip6.fr> <1428235596-4757-17-git-send-email-Julia.Lawall@lip6.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1428235596-4757-17-git-send-email-Julia.Lawall@lip6.fr> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 932 Lines: 42 Hi Julia, On Sun, Apr 05, 2015 at 02:06:36PM +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 > > --- > drivers/nfc/pn533.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Applied, thanks. Cheers, Samuel. -- 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/