[patch net] rocker: free netdevice during netdevice removal

2015-08-02 Thread Jiri Pirko
From: Ido Schimmel ido...@mellanox.com

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 ido...@mellanox.com
Signed-off-by: Jiri Pirko j...@resnulli.us
Fixes: 4b8ac9660af (rocker: introduce rocker switch driver)
---
 drivers/net/ethernet/rocker/rocker.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/rocker/rocker.c 
b/drivers/net/ethernet/rocker/rocker.c
index 7b4c347..1d0f140 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -4923,6 +4923,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);
 }
-- 
1.9.3

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch net] rocker: free netdevice during netdevice removal

2015-08-02 Thread Scott Feldman
On Sun, Aug 2, 2015 at 10:29 AM, Jiri Pirko j...@resnulli.us wrote:
 From: Ido Schimmel ido...@mellanox.com

 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 ido...@mellanox.com
 Signed-off-by: Jiri Pirko j...@resnulli.us
 Fixes: 4b8ac9660af (rocker: introduce rocker switch driver)

Acked-by: Scott Feldman sfel...@gmail.com
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch net] rocker: free netdevice during netdevice removal

2015-08-02 Thread David Miller
From: Jiri Pirko j...@resnulli.us
Date: Sun,  2 Aug 2015 19:29:16 +0200

 From: Ido Schimmel ido...@mellanox.com
 
 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 ido...@mellanox.com
 Signed-off-by: Jiri Pirko j...@resnulli.us
 Fixes: 4b8ac9660af (rocker: introduce rocker switch driver)

Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html