Netdev List
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Ion Badulescu <ionut@cs.columbia.edu>
Cc: netdev@vger.kernel.org, kernel-janitors@lists.osdl.org
Subject: [KJ] [PATCH] starfire: free_irq() on error path of netdev_open()
Date: Fri, 7 Oct 2005 02:05:23 +0400	[thread overview]
Message-ID: <20051006220523.GD2370@mipter.zuzino.mipt.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 drivers/net/starfire.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- ./drivers/net/starfire.c
+++ ./drivers/net/starfire.c
@@ -1091,8 +1091,10 @@ static int netdev_open(struct net_device
 		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 == 0) {
+			free_irq(dev->irq, dev);
 			return -ENOMEM;
+		}
 
 		np->tx_done_q     = np->queue_mem;
 		np->tx_done_q_dma = np->queue_mem_dma;


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

                 reply	other threads:[~2005-10-06 22:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051006220523.GD2370@mipter.zuzino.mipt.ru \
    --to=adobriyan@gmail.com \
    --cc=ionut@cs.columbia.edu \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox