]> git.baikalelectronics.ru Git - kernel.git/commitdiff
IB/ipoib: Delete napi in device uninit default
authorAlex Vesker <valex@mellanox.com>
Wed, 14 Jun 2017 06:59:07 +0000 (09:59 +0300)
committerDoug Ledford <dledford@redhat.com>
Wed, 14 Jun 2017 19:16:23 +0000 (15:16 -0400)
This patch mekas init_default and uninit_default symmetric
with a call to delete napi. Additionally, the uninit_default
gained delete napi call in case of init_default fails.

Fixes: 1d487d85c848 ('IB/IPoIB: Separate control and data related initializations')
Signed-off-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/ipoib/ipoib_main.c

index 91fae34bdd4f1b2f5ac5d813d6387ed131dfd45a..1015a63de6aed6f3a8b88f3816dc5720a2d24092 100644 (file)
@@ -1596,6 +1596,8 @@ static void ipoib_dev_uninit_default(struct net_device *dev)
 
        ipoib_transport_dev_cleanup(dev);
 
+       netif_napi_del(&priv->napi);
+
        ipoib_cm_dev_cleanup(dev);
 
        kfree(priv->rx_ring);
@@ -1649,6 +1651,7 @@ out_rx_ring_cleanup:
        kfree(priv->rx_ring);
 
 out:
+       netif_napi_del(&priv->napi);
        return -ENOMEM;
 }