]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: qcom: ssbi: convert null test to IS_ERR test
authorJulia Lawall <Julia.Lawall@lip6.fr>
Mon, 24 Aug 2015 21:12:26 +0000 (23:12 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 14 Sep 2015 07:13:43 +0000 (09:13 +0200)
commita5caddff0954e1051e4955fd8bc4f6c77d42ff74
tree7d646fd9d952f732f3587cff17672da327bcfa39
parent935a478e4144e0a4f690471a4a1d8ad5718a721b
pinctrl: qcom: ssbi: convert null test to IS_ERR test

Since commit 98a5dbb8ecce ("pinctrl: make pinctrl_register() return proper
error code"), pinctrl_register returns an error code rather than NULL on
failure.  Update some drivers that were 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 <Julia.Lawall@lip6.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c