Skip to content

Commit

Permalink
ibmveth: Free irq on error path
Browse files Browse the repository at this point in the history
Free irq on error path.

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Denis Kirjanov authored and David S. Miller committed Oct 21, 2010
1 parent 88426f2 commit e0e8ab5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ibmveth.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,15 +641,15 @@ 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,
netdev->mtu + IBMVETH_BUFF_OH, DMA_BIDIRECTIONAL);
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");
Expand All @@ -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);
Expand Down

0 comments on commit e0e8ab5

Please sign in to comment.