]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ice: fix an error code in ice_cfg_phy_fec()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 7 Jan 2022 08:02:06 +0000 (11:02 +0300)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 10 Feb 2022 15:42:33 +0000 (07:42 -0800)
Propagate the error code from ice_get_link_default_override() instead
of returning success.

Fixes: ea78ce4dab05 ("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>
drivers/net/ethernet/intel/ice/ice_common.c

index 408d15a5b0e3a16e66710e7307c1c23edf18f3bb..a6d7d3eff186841766f53ed7998c2852ed32ec51 100644 (file)
@@ -3342,7 +3342,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) &&