All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: weiyj_lk@163.com
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Linus Walleij <linus.walleij@linaro.org>,
	Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
	linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH -next] sh-pfc: Use PTR_ERR_OR_ZERO() to simplify the code
Date: Wed, 06 Jul 2016 16:01:53 +0300	[thread overview]
Message-ID: <1961959.7IpAs0pFbF@avalon> (raw)
In-Reply-To: <1467806612-23904-1-git-send-email-weiyj_lk@163.com>

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

  reply	other threads:[~2016-07-06 13:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-07-11  7:52 ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1961959.7IpAs0pFbF@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=geert+renesas@glider.be \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=weiyj_lk@163.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.