From: Uwe Kleine-König <[EMAIL PROTECTED]>

It doesn't make much sense to check for bus being NULL after using
bus->mdio_lock.

Signed-off-by: Uwe Kleine-König <[EMAIL PROTECTED]>
Cc: Andy Fleming <[EMAIL PROTECTED]>
---
Hello,

I already sent this patch on November 7, 2007, but without any feedback.

This is rebased to current Linus' master to account for 35b5f6b1.

Best regards
Uwe

 drivers/net/phy/mdio_bus.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 6e9f619..963630c 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)
        int i;
        int err = 0;
 
-       mutex_init(&bus->mdio_lock);
-
        if (NULL == bus || NULL == bus->name ||
                        NULL == bus->read ||
                        NULL == bus->write)
                return -EINVAL;
 
+       mutex_init(&bus->mdio_lock);
+
        if (bus->reset)
                bus->reset(bus);
 
-- 
1.5.3.8

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to