lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3676378.u1106u4Bhi@avalon>
Date:	Mon, 11 Mar 2013 22:47:17 +0100
From:	Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:	Wei Yongjun <weiyj.lk@...il.com>, horms+renesas@...ge.net.au
Cc:	linus.walleij@...aro.org, lethal@...ux-sh.org,
	yongjun_wei@...ndmicro.com.cn, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] sh-pfc: fix return value check in sh_pfc_register_pinctrl()

Hi Wei,

Thank you for the patch.

On Monday 11 March 2013 22:08:12 Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@...ndmicro.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@...ndmicro.com.cn>

Acked-by: Laurent Pinchart <laurent.pinchart@...asonboard.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ