* [PATCH -next] sh-pfc: Use PTR_ERR_OR_ZERO() to simplify the code
@ 2016-07-06 12:03 weiyj_lk
2016-07-06 13:01 ` Laurent Pinchart
2016-07-11 7:52 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: weiyj_lk @ 2016-07-06 12:03 UTC (permalink / raw)
To: Laurent Pinchart, Geert Uytterhoeven, Linus Walleij
Cc: Wei Yongjun, linux-renesas-soc, linux-gpio
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/pinctrl/sh-pfc/pinctrl.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c
index d4e65bc..e208ee0 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);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] sh-pfc: Use PTR_ERR_OR_ZERO() to simplify the code
2016-07-06 12:03 [PATCH -next] sh-pfc: Use PTR_ERR_OR_ZERO() to simplify the code weiyj_lk
@ 2016-07-06 13:01 ` Laurent Pinchart
2016-07-11 7:52 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2016-07-06 13:01 UTC (permalink / raw)
To: weiyj_lk
Cc: Geert Uytterhoeven, Linus Walleij, Wei Yongjun, linux-renesas-soc,
linux-gpio
Hello Wei,
Thank you for the patch.
On Wednesday 06 Jul 2016 12:03:32 weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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>
> ---
> drivers/pinctrl/sh-pfc/pinctrl.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c
> b/drivers/pinctrl/sh-pfc/pinctrl.c index d4e65bc..e208ee0 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);
> }
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] sh-pfc: Use PTR_ERR_OR_ZERO() to simplify the code
2016-07-06 12:03 [PATCH -next] sh-pfc: Use PTR_ERR_OR_ZERO() to simplify the code weiyj_lk
2016-07-06 13:01 ` Laurent Pinchart
@ 2016-07-11 7:52 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2016-07-11 7:52 UTC (permalink / raw)
To: weiyj_lk
Cc: Laurent Pinchart, Geert Uytterhoeven, Wei Yongjun, Linux-Renesas,
linux-gpio@vger.kernel.org
On Wed, Jul 6, 2016 at 2:03 PM, <weiyj_lk@163.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Patch applied with Laurent's ACK.
(Not expecting Geert to collect patches for me this late in the merge
cycle.)
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-11 7:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-06 12:03 [PATCH -next] sh-pfc: Use PTR_ERR_OR_ZERO() to simplify the code weiyj_lk
2016-07-06 13:01 ` Laurent Pinchart
2016-07-11 7:52 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).