summaryrefslogtreecommitdiff
path: root/drivers/net/smc911x.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-10-24 22:26:09 +0200
committerWolfgang Denk <wd@denx.de>2009-10-24 22:26:09 +0200
commit922754cc82a82ac90e486b7565a148c9e4b6b584 (patch)
tree7f42bd45ddc7ba92343446af911a4ac5d71cc874 /drivers/net/smc911x.c
parent4ee63268152594bb7af6bec2b59d53bba68082bf (diff)
parent4bc3d2afb380e78fdbb9c501d9a8da6d59eb178e (diff)
downloadu-boot-imx-922754cc82a82ac90e486b7565a148c9e4b6b584.zip
u-boot-imx-922754cc82a82ac90e486b7565a148c9e4b6b584.tar.gz
u-boot-imx-922754cc82a82ac90e486b7565a148c9e4b6b584.tar.bz2
Merge branch 'master-sync' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'drivers/net/smc911x.c')
-rw-r--r--drivers/net/smc911x.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index b106ec9..df73478 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -249,6 +249,12 @@ int smc911x_initialize(u8 dev_num, int base_addr)
dev->iobase = base_addr;
+ /* Try to detect chip. Will fail if not present. */
+ if (smc911x_detect_chip(dev)) {
+ free(dev);
+ return 0;
+ }
+
addrh = smc911x_get_mac_csr(dev, ADDRH);
addrl = smc911x_get_mac_csr(dev, ADDRL);
dev->enetaddr[0] = addrl;
@@ -264,12 +270,6 @@ int smc911x_initialize(u8 dev_num, int base_addr)
dev->recv = smc911x_rx;
sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num);
- /* Try to detect chip. Will fail if not present. */
- if (smc911x_detect_chip(dev)) {
- free(dev);
- return 0;
- }
-
eth_register(dev);
return 0;
}