net: enetc: add missing enetc4_link_deinit()
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: 99100d0d99
("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>
This commit is contained in:
parent
bbcbc906ab
commit
8e43decdfb
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue