linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@gmail.com>
To: Adam Ford <aford173@gmail.com>, netdev@vger.kernel.org
Cc: aford@beaconembedded.com, geert@linux-m68k.org,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: ethernet: ravb: Fix release of refclk
Date: Mon, 19 Apr 2021 12:38:33 +0300	[thread overview]
Message-ID: <ae2f6201-3646-4896-0246-8ae849df3a4f@gmail.com> (raw)
In-Reply-To: <20210417132329.6886-1-aford173@gmail.com>

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@gmail.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

  parent reply	other threads:[~2021-04-19  9:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17 13:23 [PATCH] net: ethernet: ravb: Fix release of refclk Adam Ford
2021-04-19  8:02 ` Geert Uytterhoeven
2021-04-19  9:38 ` Sergei Shtylyov [this message]
2021-04-19 22:45 ` David Miller
2021-04-20  3:33   ` Adam Ford
2021-04-21 14:05 Adam Ford
2021-04-21 14:25 ` Sergei Shtylyov
2021-04-21 16:03   ` Adam Ford
2021-04-21 18:20 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae2f6201-3646-4896-0246-8ae849df3a4f@gmail.com \
    --to=sergei.shtylyov@gmail.com \
    --cc=aford173@gmail.com \
    --cc=aford@beaconembedded.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=geert@linux-m68k.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).