Skip to content

Commit

Permalink
82596: free nonexistent resource fix
Browse files Browse the repository at this point in the history
During booting of last vanilla kernel I got:
Trying to free nonexistent resource...

This because of if "ENABLE_APRICOT" is on we do:
request_region(ioaddr,...)
if (checksum test failed)
  goto out1;
dev->base_addr = ioaddr;//<-here mistake

out1:
release_region(dev->base_addr,...)

This change fixes this bug for me.

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Evgeniy Dushistov authored and Jeff Garzik committed Nov 5, 2007
1 parent cacd40e commit d2ea732
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/82596.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,8 @@ struct net_device * __init i82596_probe(int unit)
goto out;
}

dev->base_addr = ioaddr;

for (i = 0; i < 8; i++) {
eth_addr[i] = inb(ioaddr + 8 + i);
checksum += eth_addr[i];
Expand All @@ -1209,7 +1211,6 @@ struct net_device * __init i82596_probe(int unit)
goto out1;
}

dev->base_addr = ioaddr;
dev->irq = 10;
}
#endif
Expand Down

0 comments on commit d2ea732

Please sign in to comment.