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: 4b8ac9660a
("rocker: introduce rocker switch driver")
Acked-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
7c764cec37
Коммит
1ebd47efa4
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче