[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdZURfExVneWCWT6xW4xgdVrFAoDYBfn=t2RKsohLzTb4A@mail.gmail.com>
Date: Wed, 29 Jun 2016 10:33:25 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Amitoj Kaur Chawla <amitoj1606@...il.com>
Cc: Maxime Coquelin <mcoquelin.stm32@...il.com>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] pinctrl: stm32: Modify error handling for pinctrl_register
On Mon, Jun 27, 2016 at 4:23 PM, Amitoj Kaur Chawla
<amitoj1606@...il.com> wrote:
> pinctrl_register returns an ERR_PTR on error.
>
> The Coccinelle semantic patch used to make this change is as follows:
>
> @@
> expression e,e1,e2;
> @@
>
> e = pinctrl_register(...)
> ... when != e = e1
> if (
> - e == NULL
> + IS_ERR(e)
> ) {
> ...
> return
> - e2
> + PTR_ERR(e)
> ;
> }
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@...il.com>
I already have a patch like this in my tree it seems.
But very nice that cocinelle is now finding this!
Yours,
Linus Walleij
Powered by blists - more mailing lists