From: Wei Yongjun Date: Wed, 6 Jul 2016 12:03:32 +0000 (+0000) Subject: sh-pfc: Use PTR_ERR_OR_ZERO() to simplify the code X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f7973d8ba01648bb878fa30dffe3a18c41081c44;p=linux-beck.git 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 Acked-by: Laurent Pinchart Signed-off-by: Linus Walleij --- 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); }