Skip to content

Commit bbb2707

Browse files
etantilovJeff Kirsher
authored andcommitted
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 <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent ea3beca commit bbb2707

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
@@ -3427,6 +3427,9 @@ static s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw)
34273427
hw->phy.sfp_setup_needed = false;
34283428
}
34293429

3430+
if (status == IXGBE_ERR_SFP_NOT_SUPPORTED)
3431+
return status;
3432+
34303433
/* Reset PHY */
34313434
if (!hw->phy.reset_disable && hw->phy.ops.reset)
34323435
hw->phy.ops.reset(hw);

0 commit comments

Comments
 (0)