Commit d8840ac9 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Jeff Garzik

[PATCH] starfire: free_irq() on error path of netdev_open()

Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 712cb1eb
...@@ -1091,8 +1091,10 @@ static int netdev_open(struct net_device *dev) ...@@ -1091,8 +1091,10 @@ static int netdev_open(struct net_device *dev)
rx_ring_size = sizeof(struct starfire_rx_desc) * RX_RING_SIZE; 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_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); 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; return -ENOMEM;
}
np->tx_done_q = np->queue_mem; np->tx_done_q = np->queue_mem;
np->tx_done_q_dma = np->queue_mem_dma; np->tx_done_q_dma = np->queue_mem_dma;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment