Skip to content

Commit

Permalink
[PATCH] starfire: free_irq() on error path of netdev_open()
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
Alexey Dobriyan authored and Jeff Garzik committed Oct 28, 2005
1 parent 712cb1e commit d8840ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/starfire.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,8 +1091,10 @@ static int netdev_open(struct net_device *dev)
rx_ring_size = sizeof(struct starfire_rx_desc) * RX_RING_SIZE;
np->queue_mem_size = tx_done_q_size + rx_done_q_size + tx_ring_size + rx_ring_size;
np->queue_mem = pci_alloc_consistent(np->pci_dev, np->queue_mem_size, &np->queue_mem_dma);
if (np->queue_mem == 0)
if (np->queue_mem == NULL) {
free_irq(dev->irq, dev);
return -ENOMEM;
}

np->tx_done_q = np->queue_mem;
np->tx_done_q_dma = np->queue_mem_dma;
Expand Down

0 comments on commit d8840ac

Please sign in to comment.