netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i82596/CONFIG_APRICOT release_region() fix
@ 2005-11-30  7:23 Magnus Damm
  0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2005-11-30  7:23 UTC (permalink / raw)
  To: netdev; +Cc: Magnus Damm

Fix release_region() in i82596 driver using CONFIG_APRICOT.

linux-2.6.15-rc3 configured with CONFIG_APRICOT=y calls release_region()
incorrectly if no hardware is found:

Trying to free nonexistent resource <00000000-00000010>

This patch sets up dev->base_addr before the label "out1" might be used.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
---

 82596.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

--- linux-2.6.15-rc3/drivers/net/82596.c	2005-11-30 16:10:34.000000000 +0900
+++ linux-2.6.15-rc3-i82596_apricot_release_region/drivers/net/82596.c	2005-11-30 16:11:13.000000000 +0900
@@ -1203,6 +1203,9 @@
 			checksum += eth_addr[i];
 		}
 
+		dev->base_addr = ioaddr;
+		dev->irq = 10;
+
 		/* checksum is a multiple of 0x100, got this wrong first time
 		   some machines have 0x100, some 0x200. The DOS driver doesn't
 		   even bother with the checksum.
@@ -1215,8 +1218,6 @@
 			goto out1;
 		}
 
-		dev->base_addr = ioaddr;
-		dev->irq = 10;
 	}
 #endif
 	dev->mem_start = (int)__get_free_pages(GFP_ATOMIC, 0);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-30  7:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-30  7:23 [PATCH] i82596/CONFIG_APRICOT release_region() fix Magnus Damm

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).