Thread (4 messages) 4 messages, 3 authors, 2015-09-08

[PATCH 2/2] pinctrl: digicolor: convert null test to IS_ERR test

From: Linus Walleij <hidden>
Date: 2015-09-08 08:56:44
Also in: kernel-janitors, linux-gpio, lkml

On Mon, Aug 24, 2015 at 11:12 PM, Julia Lawall [off-list ref] wrote:
Since commit 323de9efdf3e ("pinctrl: make pinctrl_register() return proper
error code"), pinctrl_register returns an error code rather than NULL on
failure.  Update a driver that was introduced more recently.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,e1,e2;
@@

e = pinctrl_register(...)
... when != e = e1
if (
-   e == NULL
+   IS_ERR(e)
   ) {
     ...
     return
-      e2
+      PTR_ERR(e)
     ;
     }
// </smpl>

Signed-off-by: Julia Lawall <redacted>
Patch applied for fixes.

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