[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ae2f6201-3646-4896-0246-8ae849df3a4f@gmail.com>
Date: Mon, 19 Apr 2021 12:38:33 +0300
From: Sergei Shtylyov <sergei.shtylyov@...il.com>
To: Adam Ford <aford173@...il.com>, netdev@...r.kernel.org
Cc: aford@...conembedded.com, geert@...ux-m68k.org,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Andrew Lunn <andrew@...n.ch>,
linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: ethernet: ravb: Fix release of refclk
Hello!
On 17.04.2021 16:23, Adam Ford wrote:
> The call to clk_disable_unprepare() can happen before priv is
> initialized.
Mhm, how's that? :-/
> This means moving clk_disable_unprepare out of
> out_release into a new label.
>
> Fixes: 8ef7adc6beb2("net: ethernet: ravb: Enable optional refclk")
> Signed-off-by: Adam Ford <aford173@...il.com>
>
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index 8c84c40ab9a0..64a545c98ff2 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
[...]
> @@ -2252,8 +2252,9 @@ static int ravb_probe(struct platform_device *pdev)
> /* Stop PTP Clock driver */
> if (chip_id != RCAR_GEN2)
> ravb_ptp_stop(ndev);
> -out_release:
> +out_unprepare_refclk:
I'd really prefer out_disable_refclk.
> clk_disable_unprepare(priv->refclk);
> +out_release:
> free_netdev(ndev);
>
> pm_runtime_put(&pdev->dev);
MBR, Sergei
Powered by blists - more mailing lists