All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh@kernel.org>, Nishanth Menon <nm@ti.com>,
	Lokesh Vutla <lokeshvutla@ti.com>,
	Wei Yongjun <weiyongjun1@huawei.com>,
	linux-gpio@vger.kernel.org
Subject: Re: [PATCH -next] pinctrl: ti-iodelay: Fix return value check in ti_iodelay_probe()
Date: Tue, 17 Jan 2017 15:02:01 -0800	[thread overview]
Message-ID: <20170117230201.GH7399@atomide.com> (raw)
In-Reply-To: <20170117144147.18540-1-weiyj.lk@gmail.com>

* Wei Yongjun <weiyj.lk@gmail.com> [170117 06:42]:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> In case of error, the function pinctrl_register() returns
> NULL not ERR_PTR(). The IS_ERR() test in the return value
> check should be replaced with NULL test.
> 
> Fixes: 003910ebc83b ("pinctrl: Introduce TI IOdelay configuration driver")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
> index 3b86d3d..8899f5e 100644
> --- a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
> +++ b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
> @@ -892,9 +892,9 @@ static int ti_iodelay_probe(struct platform_device *pdev)
>  	iod->desc.owner = THIS_MODULE;
>  
>  	iod->pctl = pinctrl_register(&iod->desc, dev, iod);
> -	if (!iod->pctl) {
> +	if (IS_ERR(iod->pctl)) {
>  		dev_err(dev, "Failed to register pinctrl\n");
> -		ret = -ENODEV;
> +		ret = PTR_ERR(iod->pctl);
>  		goto exit_out;
>  	}
> 

  reply	other threads:[~2017-01-17 23:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-17 14:41 [PATCH -next] pinctrl: ti-iodelay: Fix return value check in ti_iodelay_probe() Wei Yongjun
2017-01-17 23:02 ` Tony Lindgren [this message]
2017-01-18 23:29 ` 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=20170117230201.GH7399@atomide.com \
    --to=tony@atomide.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=nm@ti.com \
    --cc=robh@kernel.org \
    --cc=weiyj.lk@gmail.com \
    --cc=weiyongjun1@huawei.com \
    /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.