Skip to content

Commit

Permalink
net: ethernet: ixgbe: check the return value of ixgbe_mii_bus_init()
Browse files Browse the repository at this point in the history
This function may fail. Check its return value and propagate the error
code.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Bartosz Golaszewski authored and David S. Miller committed Jun 30, 2020
1 parent e0cdac6 commit 09ef193
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 09ef193

Please sign in to comment.