aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-02-19 19:13:53 -0500
committerJeff Garzik <jeff@garzik.org>2008-02-23 23:57:50 -0500
commitd1e7fe4d92742dd1aa28ca11512628adc79a904b (patch)
tree6e91ec8f67314651601ec968b35c1d9be110b39e /drivers/net/phy
parent68707acb5b5d4e2b7583cbff0883516afed54d4f (diff)
net/phy/mdio_bus.c: fix a check-after-use
This patch fixes a check-after-use spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/mdio_bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 6e9f619c491f..963630c65ca9 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -49,13 +49,13 @@ int mdiobus_register(struct mii_bus *bus)
49 int i; 49 int i;
50 int err = 0; 50 int err = 0;
51 51
52 mutex_init(&bus->mdio_lock);
53
54 if (NULL == bus || NULL == bus->name || 52 if (NULL == bus || NULL == bus->name ||
55 NULL == bus->read || 53 NULL == bus->read ||
56 NULL == bus->write) 54 NULL == bus->write)
57 return -EINVAL; 55 return -EINVAL;
58 56
57 mutex_init(&bus->mdio_lock);
58
59 if (bus->reset) 59 if (bus->reset)
60 bus->reset(bus); 60 bus->reset(bus);
61 61