netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dhananjay Phadke <dhananjay@netxen.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH 3/5] netxen: fix file firmware leak
Date: Fri, 11 Sep 2009 14:28:13 -0700	[thread overview]
Message-ID: <1252704495-16118-4-git-send-email-dhananjay@netxen.com> (raw)
In-Reply-To: <1252704495-16118-1-git-send-email-dhananjay@netxen.com>

Release file firmware when no firmware reset is required.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
---
 drivers/net/netxen/netxen_nic_main.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index c6f32e5..4668a72 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -817,7 +817,7 @@ netxen_start_firmware(struct netxen_adapter *adapter)
 	if (err < 0)
 		goto err_out;
 	if (err == 0)
-		goto wait_init;
+		goto ready;
 
 	if (first_boot != 0x55555555) {
 		NXWR32(adapter, CRB_CMDPEG_STATE, 0);
@@ -860,6 +860,7 @@ netxen_start_firmware(struct netxen_adapter *adapter)
 		| (_NETXEN_NIC_LINUX_SUBVERSION);
 	NXWR32(adapter, CRB_DRIVER_VERSION, val);
 
+ready:
 	NXWR32(adapter, NX_CRB_DEV_STATE, NX_DEV_READY);
 
 wait_init:
@@ -874,7 +875,7 @@ wait_init:
 
 	netxen_check_options(adapter);
 
-	return 0;
+	/* fall through and release firmware */
 
 err_out:
 	netxen_release_firmware(adapter);
-- 
1.6.0.2


  parent reply	other threads:[~2009-09-11 21:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-11 21:28 [PATCH 0/5] netxen: driver update for 2.6.32 Dhananjay Phadke
2009-09-11 21:28 ` [PATCH 1/5] netxen: change firmware write size Dhananjay Phadke
2009-09-11 21:28 ` [PATCH 2/5] netxen: improve pci memory access Dhananjay Phadke
2009-09-11 21:28 ` Dhananjay Phadke [this message]
2009-09-11 21:28 ` [PATCH 4/5] netxen: fix tx timeout recovery Dhananjay Phadke
2009-09-11 21:28 ` [PATCH 5/5] netxen: update copyright Dhananjay Phadke
2009-09-11 23:59 ` [PATCH 0/5] netxen: driver update for 2.6.32 David Miller

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=1252704495-16118-4-git-send-email-dhananjay@netxen.com \
    --to=dhananjay@netxen.com \
    --cc=davem@davemloft.net \
    --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;
as well as URLs for NNTP newsgroup(s).