xen-netback: delete NAPI instance when queue fails to initialize
authorDavid Vrabel <david.vrabel@citrix.com>
Fri, 15 Jan 2016 14:55:35 +0000 (14:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Jan 2016 20:13:18 +0000 (15:13 -0500)
When xenvif_connect() fails it may leave a stale NAPI instance added to
the device.  Make sure we delete it in the error path.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/interface.c

index e7bd63eb2876ed245a6ece5c8f24f826fb6493ed..3bba6ceee1328913299f9514ad2efe3f95dd57fa 100644 (file)
@@ -615,6 +615,7 @@ err_tx_unbind:
        queue->tx_irq = 0;
 err_unmap:
        xenvif_unmap_frontend_rings(queue);
+       netif_napi_del(&queue->napi);
 err:
        module_put(THIS_MODULE);
        return err;