提交 d1e7fe4d 编写于 作者: A Adrian Bunk 提交者: Jeff Garzik

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: NAdrian Bunk <bunk@kernel.org>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 68707acb
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册