ixgbe: return error on unsupported SFP module when resetting
authorEmil Tantilov <emil.s.tantilov@intel.com>
Fri, 20 Apr 2018 00:06:57 +0000 (17:06 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 11 May 2018 19:16:58 +0000 (12:16 -0700)
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>
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

index 3123267dfba974049cc26496570cafe842eb81ac..9592f3e3e42ed22c63f6306c45a8cce4cc4e92df 100644 (file)
@@ -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);