summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/mdio_bus.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-12-24 02:56:23 +0100
committerDavid S. Miller <davem@davemloft.net>2008-12-24 02:56:23 +0100
commit6332178d91ca1a9dbd99bd97cabbcf965d178e9f (patch)
treed98af2cbc7ff0e9e4d00b6cc8c79b05ca7815a5f /drivers/net/phy/mdio_bus.c
parentnet: Remove unused netdev arg from some NAPI interfaces. (diff)
parentppp: fix segfaults introduced by netdev_priv changes (diff)
downloadlinux-6332178d91ca1a9dbd99bd97cabbcf965d178e9f.tar.xz
linux-6332178d91ca1a9dbd99bd97cabbcf965d178e9f.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/ppp_generic.c
Diffstat (limited to 'drivers/net/phy/mdio_bus.c')
-rw-r--r--drivers/net/phy/mdio_bus.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 8755d8cd4166..7a333601fbe8 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -105,8 +105,6 @@ int mdiobus_register(struct mii_bus *bus)
return -EINVAL;
}
- bus->state = MDIOBUS_REGISTERED;
-
mutex_init(&bus->mdio_lock);
if (bus->reset)
@@ -123,6 +121,9 @@ int mdiobus_register(struct mii_bus *bus)
}
}
+ if (!err)
+ bus->state = MDIOBUS_REGISTERED;
+
pr_info("%s: probed\n", bus->name);
return err;