netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Stefan Wahren <wahrenst@gmx.net>
Cc: Wei Fang <wei.fang@nxp.com>, Shenwei Wang <shenwei.wang@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	imx@lists.linux.dev, netdev@vger.kernel.org,
	Christoph Niedermaier <cniedermaier@dh-electronics.com>,
	Richard Leitner <richard.leitner@skidata.com>
Subject: Re: [PATCH net] net: fec: Fix possible NPD in fec_enet_phy_reset_after_clk_enable()
Date: Thu, 4 Sep 2025 06:58:36 -0700	[thread overview]
Message-ID: <20250904065836.5d0f4486@kernel.org> (raw)
In-Reply-To: <20250904091334.53965-1-wahrenst@gmx.net>

On Thu,  4 Sep 2025 11:13:34 +0200 Stefan Wahren wrote:
>  		phy_dev = of_phy_find_device(fep->phy_node);
>  		phy_reset_after_clk_enable(phy_dev);
> -		put_device(&phy_dev->mdio.dev);
> +		if (phy_dev)
> +			put_device(&phy_dev->mdio.dev);

Looks correct, but isn't it better to also wrap
phy_reset_after_clk_enable() with the if()?
Up to you..

  reply	other threads:[~2025-09-04 13:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-04  9:13 [PATCH net] net: fec: Fix possible NPD in fec_enet_phy_reset_after_clk_enable() Stefan Wahren
2025-09-04 13:58 ` Jakub Kicinski [this message]
2025-09-04 18:01   ` Stefan Wahren
2025-09-04 18:59     ` Simon Horman
2025-09-05  2:11 ` Wei Fang
2025-09-06  1:00 ` 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=20250904065836.5d0f4486@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=cniedermaier@dh-electronics.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=imx@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richard.leitner@skidata.com \
    --cc=shenwei.wang@nxp.com \
    --cc=wahrenst@gmx.net \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.com \
    /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).