summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2015-08-02 19:29:16 +0200
committerDavid S. Miller <davem@davemloft.net>2015-08-02 17:19:17 -0700
commit1ebd47efa4e17391dfac8caa349c6a8d35f996d1 (patch)
tree990af8a88fe5b118c2550fc083451f1609e098a1
parent7c764cec3703583247c4ab837c652975a3d41f4b (diff)
downloadop-kernel-dev-1ebd47efa4e17391dfac8caa349c6a8d35f996d1.zip
op-kernel-dev-1ebd47efa4e17391dfac8caa349c6a8d35f996d1.tar.gz
rocker: free netdevice during netdevice removal
When removing a port's netdevice in 'rocker_remove_ports', we should also free the allocated 'net_device' structure. Do that by calling 'free_netdev' after unregistering it. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Fixes: 4b8ac9660af ("rocker: introduce rocker switch driver") Acked-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/rocker/rocker.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index 2d8578cade..2e7f9a2 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -4821,6 +4821,7 @@ static void rocker_remove_ports(const struct rocker *rocker)
rocker_port_ig_tbl(rocker_port, SWITCHDEV_TRANS_NONE,
ROCKER_OP_FLAG_REMOVE);
unregister_netdev(rocker_port->dev);
+ free_netdev(rocker_port->dev);
}
kfree(rocker->ports);
}
OpenPOWER on IntegriCloud