Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756253AbbHZMuD (ORCPT ); Wed, 26 Aug 2015 08:50:03 -0400 Received: from mail-oi0-f49.google.com ([209.85.218.49]:36198 "EHLO mail-oi0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751879AbbHZMuA (ORCPT ); Wed, 26 Aug 2015 08:50:00 -0400 MIME-Version: 1.0 In-Reply-To: <1440288682-12732-12-git-send-email-Julia.Lawall@lip6.fr> References: <1440288682-12732-1-git-send-email-Julia.Lawall@lip6.fr> <1440288682-12732-12-git-send-email-Julia.Lawall@lip6.fr> Date: Wed, 26 Aug 2015 14:50:00 +0200 Message-ID: Subject: Re: [PATCH 11/11] gpio: xlp: fix error return code From: Linus Walleij To: Julia Lawall Cc: kernel-janitors@vger.kernel.org, Alexandre Courbot , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 843 Lines: 38 On Sun, Aug 23, 2015 at 2:11 AM, 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 Patch applied. Yours, Linus Walleij -- 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/