summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2014-11-10 17:53:43 +0000
committermikeb <mikeb@openbsd.org>2014-11-10 17:53:43 +0000
commitcccaa7167b5757debecb89a0650d86da91864f1c (patch)
tree24668cfcd85f30b472934cf22f57fd41527a05e7
parentremove pointless timeout_del/add dance in the interrupt handler (diff)
downloadwireguard-openbsd-cccaa7167b5757debecb89a0650d86da91864f1c.tar.xz
wireguard-openbsd-cccaa7167b5757debecb89a0650d86da91864f1c.zip
add an additional error check into the ixgbe_handle_msf
-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);
}