diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2016-07-06 15:03:32 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-07-11 10:51:34 +0300 |
commit | f7973d8ba01648bb878fa30dffe3a18c41081c44 (patch) | |
tree | d9b434cbd54e166bd2d95179cc248d2788933531 | |
parent | aeb8753b6810df55559bcb8bdf88d88221f1521a (diff) | |
download | linux-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>
-rw-r--r-- | drivers/pinctrl/sh-pfc/pinctrl.c | 5 |
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); } |