Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

authored by

Alexey Dobriyan and committed by
Jeff Garzik
d8840ac9 712cb1eb

+3 -1
+3 -1
drivers/net/starfire.c
··· 1091 1091 rx_ring_size = sizeof(struct starfire_rx_desc) * RX_RING_SIZE; 1092 1092 np->queue_mem_size = tx_done_q_size + rx_done_q_size + tx_ring_size + rx_ring_size; 1093 1093 np->queue_mem = pci_alloc_consistent(np->pci_dev, np->queue_mem_size, &np->queue_mem_dma); 1094 - if (np->queue_mem == 0) 1094 + if (np->queue_mem == NULL) { 1095 + free_irq(dev->irq, dev); 1095 1096 return -ENOMEM; 1097 + } 1096 1098 1097 1099 np->tx_done_q = np->queue_mem; 1098 1100 np->tx_done_q_dma = np->queue_mem_dma;