net:fec: Add fec_enet_deinit()
authorXiaolei Wang <xiaolei.wang@windriver.com>
Fri, 24 May 2024 05:05:28 +0000 (13:05 +0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 27 May 2024 23:55:32 +0000 (16:55 -0700)
commitbf0497f53c8535f99b72041529d3f7708a6e2c0d
tree21620285c420dd6c943f887730e3bdd372d4bbd8
parent12f86b9af96a8b09969e4392311602f787b40834
net:fec: Add fec_enet_deinit()

When fec_probe() fails or fec_drv_remove() needs to release the
fec queue and remove a NAPI context, therefore add a function
corresponding to fec_enet_init() and call fec_enet_deinit() which
does the opposite to release memory and remove a NAPI context.

Fixes: 59d0f7465644 ("net: fec: init multi queue date structure")
Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Reviewed-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20240524050528.4115581-1-xiaolei.wang@windriver.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/fec_main.c