lkml.org 
[lkml]   [2016]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] pinctrl: stm32: Modify error handling for pinctrl_register
On Mon, Jun 27, 2016 at 4:23 PM, Amitoj Kaur Chawla
<amitoj1606@gmail.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@gmail.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

\
 
 \ /
  Last update: 2016-06-29 11:01    [W:0.050 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site