[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220107080206.GI22086@kili>
Date: Fri, 7 Jan 2022 11:02:06 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Jesse Brandeburg <jesse.brandeburg@...el.com>
Cc: Tony Nguyen <anthony.l.nguyen@...el.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paul Greenwalt <paul.greenwalt@...el.com>,
Evan Swanson <evan.swanson@...el.com>,
intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH net] ice: fix an error code in ice_cfg_phy_fec()
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@...cle.com>
---
>From static analysis. Not tested!
drivers/net/ethernet/intel/ice/ice_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index 2a1ee60e85f4..67343a1a43d1 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -3321,7 +3321,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) &&
--
2.20.1
Powered by blists - more mailing lists