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: <AM8PR04MB731542047A051973B74BBAD4FF280@AM8PR04MB7315.eurprd04.prod.outlook.com>
Date:   Mon, 7 Sep 2020 13:14:50 +0000
From:   Andy Duan <fugang.duan@....com>
To:     Zhang Changzhong <zhangchangzhong@...wei.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net-next] net: ethernet: fec: remove redundant null check
 before clk_disable_unprepare()

From: Zhang Changzhong <zhangchangzhong@...wei.com> Sent: Monday, September 7, 2020 8:50 PM
> Because clk_prepare_enable() and clk_disable_unprepare() already checked
> NULL clock parameter, so the additional checks are unnecessary, just remove
> them.
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Zhang Changzhong <zhangchangzhong@...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 fb37816..c043afb 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1960,8 +1960,7 @@ static int fec_enet_clk_enable(struct net_device
> *ndev, bool enable)
>  		mutex_unlock(&fep->ptp_clk_mutex);
>  	}
>  failed_clk_ptp:
> -	if (fep->clk_enet_out)
> -		clk_disable_unprepare(fep->clk_enet_out);
> +	clk_disable_unprepare(fep->clk_enet_out);
> 
>  	return ret;
>  }
> --
> 2.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ