lkml.org 
[lkml]   [2013]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH -next] sh-pfc: fix return value check in sh_pfc_register_pinctrl()
Date
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



\
 
 \ /
  Last update: 2013-03-12 05:02    [W:0.535 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site