Skip to content

Commit

Permalink
ixgbe: return error on unsupported SFP module when resetting
Browse files Browse the repository at this point in the history
[ Upstream commit bbb2707 ]

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 <[email protected]>
Tested-by: Andrew Bowers <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
etantilov authored and gregkh committed Jun 20, 2018
1 parent 42aa0ba commit a50c3a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a50c3a7

Please sign in to comment.