summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ix.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2014-11-10 17:53:44 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2014-11-10 17:53:44 +0000
commitb2cb619f96c37e0cb8dc1d1d8a6f65a9c9c231a9 (patch)
treeab6ab95294d103ac1a443ac383f5f011896ba1eb /sys/dev/pci/if_ix.c
parent45287d23b119580f0953ca67bac95fe969c821bf (diff)
add an additional error check into the ixgbe_handle_msf
Diffstat (limited to 'sys/dev/pci/if_ix.c')
-rw-r--r--sys/dev/pci/if_ix.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index 58f23838e25..0ae2ff9840d 100644
--- a/sys/dev/pci/if_ix.c
+++ b/sys/dev/pci/if_ix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ix.c,v 1.105 2014/11/10 17:53:10 mikeb Exp $ */
+/* $OpenBSD: if_ix.c,v 1.106 2014/11/10 17:53:43 mikeb Exp $ */
/******************************************************************************
@@ -3237,12 +3237,15 @@ void
ixgbe_handle_msf(struct ix_softc *sc)
{
struct ixgbe_hw *hw = &sc->hw;
- uint32_t autoneg;
+ uint32_t autoneg, err;
bool negotiate;
autoneg = hw->phy.autoneg_advertised;
if ((!autoneg) && (hw->mac.ops.get_link_capabilities))
- hw->mac.ops.get_link_capabilities(hw, &autoneg, &negotiate);
+ err = hw->mac.ops.get_link_capabilities(hw, &autoneg,
+ &negotiate);
+ if (err)
+ return;
if (hw->mac.ops.setup_link)
hw->mac.ops.setup_link(hw, autoneg, TRUE);
}