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: <VI1PR0402MB3600930E36B28B7328937013FF1E0@VI1PR0402MB3600.eurprd04.prod.outlook.com>
Date:   Mon, 17 Sep 2018 01:55:35 +0000
From:   Andy Duan <fugang.duan@....com>
To:     zhong jiang <zhongjiang@...wei.com>,
        "davem@...emloft.net" <davem@...emloft.net>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] net: ethernet: remove redundant null pointer check before
 of_node_put

From: zhong jiang <zhongjiang@...wei.com> Sent: 2018年9月16日 21:14
> of_node_put has taken the null pinter check into account. So it is safe to
> remove the duplicated check before of_node_put.
> 
> Signed-off-by: zhong jiang <zhongjiang@...wei.com>

Acked-by: Fugang Duan <fugang.duan@....com>

> ---
>  drivers/net/ethernet/freescale/fec_main.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> index 2708297..67d6c9d 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -2055,8 +2055,7 @@ static int fec_enet_mii_init(struct
> platform_device *pdev)
> 
>  	node = of_get_child_by_name(pdev->dev.of_node, "mdio");
>  	err = of_mdiobus_register(fep->mii_bus, node);
> -	if (node)
> -		of_node_put(node);
> +	of_node_put(node);
>  	if (err)
>  		goto err_out_free_mdiobus;
> 
> --
> 1.7.12.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ