Skip to content

Commit 55e95f9

Browse files
etantilovgregkh
authored andcommitted
ixgbe: return error on unsupported SFP module when resetting
[ 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]>
1 parent 33d1c29 commit 55e95f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3413,6 +3413,9 @@ static s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw)
34133413
hw->phy.sfp_setup_needed = false;
34143414
}
34153415

3416+
if (status == IXGBE_ERR_SFP_NOT_SUPPORTED)
3417+
return status;
3418+
34163419
/* Reset PHY */
34173420
if (!hw->phy.reset_disable && hw->phy.ops.reset)
34183421
hw->phy.ops.reset(hw);

0 commit comments

Comments
 (0)