mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 08:38:24 +08:00
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>
This commit is contained in:
parent
68707acb5b
commit
d1e7fe4d92
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user