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]
Date:	Fri, 21 Sep 2012 10:21:30 +0200
From:	Giuseppe CAVALLARO <peppe.cavallaro@...com>
To:	Wei Yongjun <weiyj.lk@...il.com>
Cc:	yongjun_wei@...ndmicro.com.cn, netdev@...r.kernel.org
Subject: Re: [PATCH] stmmac: fix return value check in stmmac_open_ext_timer()

On 9/21/2012 9:06 AM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
>
> In case of error, the function clk_get() returns ERR_PTR()
> and never returns NULL pointer. The NULL test in the error
> handling should be replaced with IS_ERR().
>
> dpatch engine is used to auto generated this patch.
> (https://github.com/weiyj/dpatch)

FYI I have recently sent some patches (still under reviewing) to 
completely remove this dead code from the driver.

http://marc.info/?l=linux-netdev&m=134734656020277&w=2

Peppe

> Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
> ---
>   drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c
> index 2a0e1ab..197fb8c 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c
> @@ -109,7 +109,7 @@ int stmmac_open_ext_timer(struct net_device *dev, struct stmmac_timer *tm)
>   {
>   	timer_clock = clk_get(NULL, TMU_CHANNEL);
>
> -	if (timer_clock == NULL)
> +	if (IS_ERR(timer_clock))
>   		return -1;
>
>   	if (tmu2_register_user(stmmac_timer_handler, (void *)dev) < 0) {
>
>
>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ