Skip to content

Commit

Permalink
net/phy/mdio_bus.c: fix a check-after-use
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Bunk authored and Jeff Garzik committed Feb 24, 2008
1 parent 68707ac commit d1e7fe4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/phy/mdio_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit d1e7fe4

Please sign in to comment.