mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-16 06:18:54 +07:00
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: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e0cdac65ba
commit
09ef193fef
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user