Skip to content

Commit

Permalink
ice: fix an error code in ice_cfg_phy_fec()
Browse files Browse the repository at this point in the history
[ Upstream commit 21338d5 ]

Propagate the error code from ice_get_link_default_override() instead
of returning success.

Fixes: ea78ce4 ("ice: add link lenient and default override support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Dan Carpenter authored and gregkh committed Feb 16, 2022
1 parent 12e067a commit efd399e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/intel/ice/ice_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -3272,7 +3272,8 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
!ice_fw_supports_report_dflt_cfg(hw)) {
struct ice_link_default_override_tlv tlv;

if (ice_get_link_default_override(&tlv, pi))
status = ice_get_link_default_override(&tlv, pi);
if (status)
goto out;

if (!(tlv.options & ICE_LINK_OVERRIDE_STRICT_MODE) &&
Expand Down

0 comments on commit efd399e

Please sign in to comment.