Message ID | 20220107080206.GI22086@kili (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] ice: fix an error code in ice_cfg_phy_fec() | expand |
> -----Original Message----- > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of > Dan Carpenter > Sent: Friday, January 7, 2022 1:32 PM > To: Brandeburg, Jesse <jesse.brandeburg@intel.com> > Cc: Swanson, Evan <evan.swanson@intel.com>; netdev@vger.kernel.org; > kernel-janitors@vger.kernel.org; intel-wired-lan@lists.osuosl.org; Jakub > Kicinski <kuba@kernel.org>; David S. Miller <davem@davemloft.net> > Subject: [Intel-wired-lan] [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@oracle.com> > --- > From static analysis. Not tested! > > drivers/net/ethernet/intel/ice/ice_common.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
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) &&
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> --- From static analysis. Not tested! drivers/net/ethernet/intel/ice/ice_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)