提交 09ef193f 编写于 作者: B Bartosz Golaszewski 提交者: David S. Miller

net: ethernet: ixgbe: check the return value of ixgbe_mii_bus_init()

This function may fail. Check its return value and propagate the error
code.
Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e0cdac65
......@@ -11173,10 +11173,14 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
IXGBE_LINK_SPEED_10GB_FULL | IXGBE_LINK_SPEED_1GB_FULL,
true);
ixgbe_mii_bus_init(hw);
err = ixgbe_mii_bus_init(hw);
if (err)
goto err_netdev;
return 0;
err_netdev:
unregister_netdev(netdev);
err_register:
ixgbe_release_hw_control(adapter);
ixgbe_clear_interrupt_scheme(adapter);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册