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: <7b499451-623c-cabf-2c95-fc7019895b3d@gmail.com>
Date:   Mon, 20 Jul 2020 09:02:22 -0700
From:   Doug Berger <opendmb@...il.com>
To:     Zhang Changzhong <zhangchangzhong@...wei.com>,
        f.fainelli@...il.com, davem@...emloft.net, kuba@...nel.org
Cc:     bcm-kernel-feedback-list@...adcom.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: bcmgenet: add missed clk_disable_unprepare in
 bcmgenet_probe

On 7/20/2020 2:36 AM, Zhang Changzhong wrote:
> The driver forgets to call clk_disable_unprepare() in error path after
> a success calling for clk_prepare_enable().
> 
> Fix to goto err_clk_disable if clk_prepare_enable() is successful.
> 
> Fixes: c80d36ff63a5 ("net: bcmgenet: Use devm_clk_get_optional() to get the clocks")
> Signed-off-by: Zhang Changzhong <zhangchangzhong@...wei.com>
> ---
>  drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> index 368e05b..79d27be 100644
> --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> @@ -4000,14 +4000,14 @@ static int bcmgenet_probe(struct platform_device *pdev)
>  	if (IS_ERR(priv->clk_wol)) {
>  		dev_dbg(&priv->pdev->dev, "failed to get enet-wol clock\n");
>  		err = PTR_ERR(priv->clk_wol);
> -		goto err;
> +		goto err_clk_disable;
>  	}
>  
>  	priv->clk_eee = devm_clk_get_optional(&priv->pdev->dev, "enet-eee");
>  	if (IS_ERR(priv->clk_eee)) {
>  		dev_dbg(&priv->pdev->dev, "failed to get enet-eee clock\n");
>  		err = PTR_ERR(priv->clk_eee);
> -		goto err;
> +		goto err_clk_disable;
>  	}
>  
>  	/* If this is an internal GPHY, power it on now, before UniMAC is
> 
Acked-by: Doug Berger <opendmb@...il.com>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ