提交 d2ea732e 编写于 作者: E Evgeniy Dushistov 提交者: Jeff Garzik

82596: free nonexistent resource fix

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: NEvgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 cacd40e0
......@@ -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];
......@@ -1209,7 +1211,6 @@ struct net_device * __init i82596_probe(int unit)
goto out1;
}
dev->base_addr = ioaddr;
dev->irq = 10;
}
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册