mlxsw: Call free_netdev when removing port
authorIdo Schimmel <idosch@mellanox.com>
Thu, 6 Aug 2015 14:41:52 +0000 (16:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Aug 2015 05:54:09 +0000 (22:54 -0700)
commit26a80f6e542e6b86c9ad9c3d217d74ca8c3fed66
treeaf74bed0b1556213ac2fb893dded46044575f675
parentecea49914b329e3f5cf746979c10e05e6bdad77a
mlxsw: Call free_netdev when removing port

When removing a port's netdevice we should also free the memory
allocated by alloc_etherdev(). Do this by calling free_netdev() at the
end of the teardown sequence.

Reported-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/switchx2.c