summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/sh-pfc/pinctrl.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2016-07-06 15:03:32 +0300
committerLinus Walleij <linus.walleij@linaro.org>2016-07-11 10:51:34 +0300
commitf7973d8ba01648bb878fa30dffe3a18c41081c44 (patch)
treed9b434cbd54e166bd2d95179cc248d2788933531 /drivers/pinctrl/sh-pfc/pinctrl.c
parentaeb8753b6810df55559bcb8bdf88d88221f1521a (diff)
downloadlinux-f7973d8ba01648bb878fa30dffe3a18c41081c44.tar.xz
sh-pfc: Use PTR_ERR_OR_ZERO() to simplify the code
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>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/pinctrl.c')
-rw-r--r--drivers/pinctrl/sh-pfc/pinctrl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c
index d4e65bc7dacd..e208ee04a9f4 100644
--- 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);
}