瀏覽代碼

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>
Emil Tantilov 7 年之前
父節點
當前提交
bbb2707623
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

+ 3 - 0
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);