summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2018-04-20 03:06:57 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-05-11 22:16:58 +0300
commitbbb2707623f3ccc48695da2433f06d7c38193451 (patch)
treebc6ee63288a60d65a97e4dc705f362b56de8c8b8
parentea3beca422742ca7e8502496e2806421d5e9d6fd (diff)
downloadlinux-bbb2707623f3ccc48695da2433f06d7c38193451.tar.xz
ixgbe: return error on unsupported SFP module when resetting
Add check for unsupported module and return the error code. This fixes a Coverity hit due to unused return status from setup_sfp. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
index 3123267dfba9..9592f3e3e42e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -3427,6 +3427,9 @@ static s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw)
hw->phy.sfp_setup_needed = false;
}
+ if (status == IXGBE_ERR_SFP_NOT_SUPPORTED)
+ return status;
+
/* Reset PHY */
if (!hw->phy.reset_disable && hw->phy.ops.reset)
hw->phy.ops.reset(hw);