netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dhananjay Phadke <dhananjay@netxen.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] netxen: avoid invalid iounmap
Date: Fri, 16 Jan 2009 10:28:03 -0800	[thread overview]
Message-ID: <1232130484-25188-2-git-send-email-dhananjay@netxen.com> (raw)
In-Reply-To: <1232130484-25188-1-git-send-email-dhananjay@netxen.com>

For NX3031 only one I/O range is mapped, so unmapping other
two which are used by older chips, causes this warning on
ppc64.

"Attempt to iounmap early bolted mapping at 0x0000000000000000"

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

diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 8686740..f8e2629 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -1004,8 +1004,10 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev)
 
 	iounmap(adapter->ahw.db_base);
 	iounmap(adapter->ahw.pci_base0);
-	iounmap(adapter->ahw.pci_base1);
-	iounmap(adapter->ahw.pci_base2);
+	if (adapter->ahw.pci_base1 != NULL)
+		iounmap(adapter->ahw.pci_base1);
+	if (adapter->ahw.pci_base2 != NULL)
+		iounmap(adapter->ahw.pci_base2);
 
 	pci_release_regions(pdev);
 	pci_disable_device(pdev);
-- 
1.6.0.2


  reply	other threads:[~2009-01-16 18:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-16 18:28 [PATCH 0/2] netxen fixes Dhananjay Phadke
2009-01-16 18:28 ` Dhananjay Phadke [this message]
2009-01-16 19:03   ` [PATCH 1/2] netxen: avoid invalid iounmap David Miller
2009-01-16 18:28 ` [PATCH 2/2] netxen: include ipv6.h (fixes build failure) Dhananjay Phadke
2009-01-16 19:04   ` David Miller
2009-01-16 19:21     ` Dhananjay Phadke

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=1232130484-25188-2-git-send-email-dhananjay@netxen.com \
    --to=dhananjay@netxen.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).