]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ibmveth: Free irq on error path
authorDenis Kirjanov <dkirjanov@kernel.org>
Wed, 20 Oct 2010 04:21:51 +0000 (04:21 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Oct 2010 08:26:46 +0000 (01:26 -0700)
Free irq on error path.

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ibmveth.c

index 2ae8336478b3745280e9620917bf847102633042..c454b45ca7ec9caf55cd0f22d0dd7bb2438db381 100644 (file)
@@ -641,7 +641,7 @@ static int ibmveth_open(struct net_device *netdev)
        if (!adapter->bounce_buffer) {
                netdev_err(netdev, "unable to allocate bounce buffer\n");
                rc = -ENOMEM;
-               goto err_out;
+               goto err_out_free_irq;
        }
        adapter->bounce_buffer_dma =
            dma_map_single(&adapter->vdev->dev, adapter->bounce_buffer,
@@ -649,7 +649,7 @@ static int ibmveth_open(struct net_device *netdev)
        if (dma_mapping_error(dev, adapter->bounce_buffer_dma)) {
                netdev_err(netdev, "unable to map bounce buffer\n");
                rc = -ENOMEM;
-               goto err_out;
+               goto err_out_free_irq;
        }
 
        netdev_dbg(netdev, "initial replenish cycle\n");
@@ -661,6 +661,8 @@ static int ibmveth_open(struct net_device *netdev)
 
        return 0;
 
+err_out_free_irq:
+       free_irq(netdev->irq, netdev);
 err_out:
        ibmveth_cleanup(adapter);
        napi_disable(&adapter->napi);