From: Rosen Penev <rosenp@gmail.com>
To: netdev@vger.kernel.org
Cc: Pantelis Antoniou <pantelis.antoniou@gmail.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Russell King <linux@armlinux.org.uk> (maintainer:SFF/SFP/SFP+
MODULE SUPPORT:Keyword:phylink\.h|struct\s+phylink|\.phylink|>,
linuxppc-dev@lists.ozlabs.org (open list:FREESCALE SOC FS_ENET
DRIVER), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH net] net: fs_enet: add missing kfree in _remove
Date: Mon, 23 Feb 2026 17:55:17 -0800 [thread overview]
Message-ID: <20260224015517.354145-1-rosenp@gmail.com> (raw)
The kfree is present in _probe on failure but not in remove.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
index d3c772ed5fc9..ee2b7e8866ee 100644
--- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
+++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
@@ -1008,6 +1008,7 @@ static void fs_enet_remove(struct platform_device *ofdev)
dev_set_drvdata(fep->dev, NULL);
phylink_destroy(fep->phylink);
free_netdev(ndev);
+ kfree(fep);
}
static const struct of_device_id fs_enet_match[] = {
--
2.53.0
next reply other threads:[~2026-02-24 1:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 1:55 Rosen Penev [this message]
2026-02-24 8:20 ` [PATCH net] net: fs_enet: add missing kfree in _remove Christophe Leroy (CS GROUP)
2026-02-24 22:24 ` Rosen Penev
2026-02-25 1:59 ` Jakub Kicinski
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=20260224015517.354145-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pantelis.antoniou@gmail.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