From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
Jiawen Wu <jiawenwu@trustnetic.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Simon Horman <simon.horman@corigine.com>,
Jose Abreu <Jose.Abreu@synopsys.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/6] net: pcs: xpcs: add xpcs_create_mdiodev()
Date: Mon, 29 May 2023 17:05:13 +0100 [thread overview]
Message-ID: <ZHTNOepLuMCcDNTu@shell.armlinux.org.uk> (raw)
In-Reply-To: <ab35060f-405d-4aaa-8e84-9f5a77e5eee3@lunn.ch>
On Mon, May 29, 2023 at 05:25:45PM +0200, Andrew Lunn wrote:
> > void xpcs_destroy(struct dw_xpcs *xpcs)
> > {
> > + if (xpcs)
> > + mdio_device_put(xpcs->mdiodev);
> > kfree(xpcs);
> > }
>
> Nit:
>
> Is the if () needed? Can destroy be called if create was not
> successful?
kfree(NULL) is a no-op, so xpcs_destroy() will not oops if passed a NULL
pointer. So it makes sense to preserve this.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2023-05-29 16:05 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 10:13 [PATCH net-next 0/6] net: pcs: add helpers to xpcs and lynx to manage mdiodev Russell King (Oracle)
2023-05-26 10:13 ` Russell King (Oracle)
2023-05-26 10:14 ` [PATCH net-next 1/6] net: mdio: add mdio_device_get() and mdio_device_put() Russell King (Oracle)
2023-05-26 18:20 ` andy.shevchenko
2023-05-29 15:21 ` Andrew Lunn
2023-05-29 20:34 ` Andy Shevchenko
2023-05-29 22:41 ` Russell King (Oracle)
2023-05-29 15:18 ` Andrew Lunn
2023-05-26 10:14 ` [PATCH net-next 2/6] net: pcs: xpcs: add xpcs_create_mdiodev() Russell King (Oracle)
2023-05-29 15:25 ` Andrew Lunn
2023-05-29 16:05 ` Russell King (Oracle) [this message]
2023-05-29 16:27 ` Vladimir Oltean
2023-05-26 10:14 ` [PATCH net-next 3/6] net: stmmac: use xpcs_create_mdiodev() Russell King (Oracle)
2023-05-26 10:14 ` Russell King (Oracle)
2023-05-29 15:26 ` Andrew Lunn
2023-05-29 15:26 ` Andrew Lunn
2023-05-26 10:14 ` [PATCH net-next 4/6] net: pcs: lynx: add lynx_pcs_create_mdiodev() Russell King (Oracle)
2023-05-26 18:22 ` andy.shevchenko
2023-05-29 15:28 ` Andrew Lunn
2023-05-29 17:08 ` Ioana Ciornei
2023-05-26 10:14 ` [PATCH net-next 5/6] net: dsa: ocelot: use lynx_pcs_create_mdiodev() Russell King (Oracle)
2023-05-29 15:28 ` Andrew Lunn
2023-05-29 15:47 ` Vladimir Oltean
2023-05-26 10:14 ` [PATCH net-next 6/6] net: enetc: " Russell King (Oracle)
2023-05-29 15:29 ` Andrew Lunn
2023-05-29 15:46 ` Vladimir Oltean
2023-05-30 5:00 ` [PATCH net-next 0/6] net: pcs: add helpers to xpcs and lynx to manage mdiodev patchwork-bot+netdevbpf
2023-05-30 5: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=ZHTNOepLuMCcDNTu@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=Jose.Abreu@synopsys.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=jiawenwu@trustnetic.com \
--cc=kuba@kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.