Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1e7fe4d authored by Adrian Bunk's avatar Adrian Bunk Committed by Jeff Garzik
Browse files

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: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 68707acb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);