Thread (2 messages) 2 messages, 2 authors, 2016-06-29

[PATCH] pinctrl: stm32: Modify error handling for pinctrl_register

From: Linus Walleij <hidden>
Date: 2016-06-29 08:33:30
Also in: linux-gpio, lkml

On Mon, Jun 27, 2016 at 4:23 PM, Amitoj Kaur Chawla
[off-list ref] 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 <redacted>
I already have a patch like this in my tree it seems.

But very nice that cocinelle is now finding this!

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help