[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1401021351000.14951@pobox.suse.cz>
Date: Thu, 2 Jan 2014 13:51:10 +0100 (CET)
From: Jiri Kosina <jkosina@...e.cz>
To: Julia Lawall <Julia.Lawall@...6.fr>
cc: kernel-janitors@...r.kernel.org, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 12/25] HID: sony: fix error return code
On Sun, 29 Dec 2013, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@...6.fr>
>
> Currently the return variable ret is always 0. Set it to other values in
> error cases, as used in the direct return.
>
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> (
> if@p1 (\(ret < 0\|ret != 0\))
> { ... return ret; }
> |
> ret@p1 = 0
> )
> ... when != ret = e1
> when != &ret
> *if(...)
> {
> ... when != ret = e2
> when forall
> return ret;
> }
>
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@...6.fr>
Applied, thanks.
--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists