summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-11-15 14:24:54 +0800
committerDavid S. Miller <davem@davemloft.net>2019-11-16 12:53:38 -0800
commit18d647ae74116bfee38953978501cea2960a0c25 (patch)
tree3fa84e25f6ec57c7addd4950f80cb7d06edf4f3f /drivers
parentc80ed84e76886487703bf04b38ce10e92e2d6e26 (diff)
downloadlinux-18d647ae74116bfee38953978501cea2960a0c25.tar.bz2
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>
Diffstat (limited to 'drivers')
-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;
}