Skip to content

Commit

Permalink
net: enetc: add missing enetc4_link_deinit()
Browse files Browse the repository at this point in the history
The enetc4_link_init() is called when the PF driver probes to create
phylink and MDIO bus, but we forgot to call enetc4_link_deinit() to
free the phylink and MDIO bus when the driver was unbound. so add
missing enetc4_link_deinit() to enetc4_pf_netdev_destroy().

Fixes: 99100d0 ("net: enetc: add preliminary support for i.MX95 ENETC PF")
Cc: stable@vger.kernel.org
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20250224111251.1061098-7-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Wei Fang authored and Jakub Kicinski committed Feb 26, 2025
1 parent bbcbc90 commit 8e43dec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/freescale/enetc/enetc4_pf.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ static void enetc4_pf_netdev_destroy(struct enetc_si *si)
struct net_device *ndev = si->ndev;

unregister_netdev(ndev);
enetc4_link_deinit(priv);
enetc_free_msix(priv);
free_netdev(ndev);
}
Expand Down

0 comments on commit 8e43dec

Please sign in to comment.