summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-11-15 07:24:54 +0100
committerDavid S. Miller <davem@davemloft.net>2019-11-16 21:53:38 +0100
commit18d647ae74116bfee38953978501cea2960a0c25 (patch)
tree3fa84e25f6ec57c7addd4950f80cb7d06edf4f3f
parentnet: dsa: tag_8021q: Fix dsa_8021q_restore_pvid for an absent pvid (diff)
downloadlinux-18d647ae74116bfee38953978501cea2960a0c25.tar.xz
linux-18d647ae74116bfee38953978501cea2960a0c25.zip
net: gemini: add missed free_netdev
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@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/cortina/gemini.c1
1 files changed, 1 insertions, 0 deletions
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;
}