[PATCH] net: gemini: add missed free_netdev

From: Chuhong Yuan
Date: Fri Nov 15 2019 - 01:25:11 EST


This driver forgets to free allocated netdev in remove like
what is done in probe failure.
Add the free to fix it.

Signed-off-by: Chuhong Yuan <hslester96@xxxxxxxxx>
---
drivers/net/ethernet/cortina/gemini.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c
index e736ce2c58ca..a8f4c69252ff 100644
--- a/drivers/net/ethernet/cortina/gemini.c
+++ b/drivers/net/ethernet/cortina/gemini.c
@@ -2524,6 +2524,7 @@ static int gemini_ethernet_port_remove(struct platform_device *pdev)
struct gemini_ethernet_port *port = platform_get_drvdata(pdev);

gemini_port_remove(port);
+ free_netdev(port->netdev);
return 0;
}

--
2.24.0