diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2020-06-29 14:03:37 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-30 15:57:34 -0700 |
commit | 09ef193fef7efb0175a04634853862d717adbb95 (patch) | |
tree | 1e0d25ac25590865d99c057a46cff296356fafd1 /drivers/net/ethernet/intel | |
parent | e0cdac65ba269767d5531cc40ab7fe858e2650d9 (diff) |
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>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 254486e6b09d..fabdca9aadae 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -11173,10 +11173,14 @@ skip_sriov: 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); |