projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aeb8753
)
sh-pfc: Use PTR_ERR_OR_ZERO() to simplify the code
author
Wei Yongjun
<yongjun_wei@trendmicro.com.cn>
Wed, 6 Jul 2016 12:03:32 +0000
(12:03 +0000)
committer
Linus Walleij
<linus.walleij@linaro.org>
Mon, 11 Jul 2016 07:51:34 +0000
(09:51 +0200)
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sh-pfc/pinctrl.c
patch
|
blob
|
history
diff --git
a/drivers/pinctrl/sh-pfc/pinctrl.c
b/drivers/pinctrl/sh-pfc/pinctrl.c
index d4e65bc7dacd67b5ed3b1de76efd6d4e1a4a78e2..e208ee04a9f45482044606bc509c70ec5170c4cb 100644
(file)
--- a/
drivers/pinctrl/sh-pfc/pinctrl.c
+++ b/
drivers/pinctrl/sh-pfc/pinctrl.c
@@
-814,8
+814,5
@@
int sh_pfc_register_pinctrl(struct sh_pfc *pfc)
pmx->pctl_desc.npins = pfc->info->nr_pins;
pmx->pctl = devm_pinctrl_register(pfc->dev, &pmx->pctl_desc, pmx);
- if (IS_ERR(pmx->pctl))
- return PTR_ERR(pmx->pctl);
-
- return 0;
+ return PTR_ERR_OR_ZERO(pmx->pctl);
}