From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Wei Yongjun <weiyj.lk@gmail.com>, horms+renesas@verge.net.au
Cc: linus.walleij@linaro.org, lethal@linux-sh.org,
yongjun_wei@trendmicro.com.cn, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] sh-pfc: fix return value check in sh_pfc_register_pinctrl()
Date: Mon, 11 Mar 2013 22:47:17 +0100 [thread overview]
Message-ID: <3676378.u1106u4Bhi@avalon> (raw)
In-Reply-To: <CAPgLHd-SZw14C_jDYrGNyYWJ7XafX--NEaF9+QofAcm9CuFK_w@mail.gmail.com>
Hi Wei,
Thank you for the patch.
On Monday 11 March 2013 22:08:12 Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
I've taken the patch in my tree and will push it to v3.10.
> ---
> drivers/pinctrl/sh-pfc/pinctrl.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c
> b/drivers/pinctrl/sh-pfc/pinctrl.c index 11e0e13..271e2c1 100644
> --- a/drivers/pinctrl/sh-pfc/pinctrl.c
> +++ b/drivers/pinctrl/sh-pfc/pinctrl.c
> @@ -439,8 +439,8 @@ int sh_pfc_register_pinctrl(struct sh_pfc *pfc)
> return ret;
>
> pmx->pctl = pinctrl_register(&sh_pfc_pinctrl_desc, pfc->dev, pmx);
> - if (IS_ERR(pmx->pctl))
> - return PTR_ERR(pmx->pctl);
> + if (!pmx->pctl)
> + return -EINVAL;
>
> sh_pfc_gpio_range.npins = pfc->info->last_gpio
> - pfc->info->first_gpio + 1;
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2013-03-11 21:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 14:08 [PATCH -next] sh-pfc: fix return value check in sh_pfc_register_pinctrl() Wei Yongjun
2013-03-11 21:47 ` Laurent Pinchart [this message]
2013-03-13 17:43 ` 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=3676378.u1106u4Bhi@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=horms+renesas@verge.net.au \
--cc=lethal@linux-sh.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=weiyj.lk@gmail.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.