From: Emil Tantilov Date: Fri, 20 Apr 2018 00:06:57 +0000 (-0700) Subject: ixgbe: return error on unsupported SFP module when resetting X-Git-Tag: v4.19~1050^2~2^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bbb2707623f3ccc48695da2433f06d7c38193451;p=platform%2Fkernel%2Flinux-rpi3.git 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 Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c index 3123267..9592f3e 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c +++ b/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);