From: Fabio Pricoco <fabio.pric...@intel.com> Initialize some variable to avoid "variable might be not defined" warning. This is due to the fact that when using silicon validation tools, sometimes alternative fragments of code are being executed exclusively thanks to use of goto, which some compilers cannot handle correctly.
Signed-off-by: Fabio Pricoco <fabio.pric...@intel.com> Signed-off-by: Ian Stokes <ian.sto...@intel.com> --- drivers/net/ice/base/ice_switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index bd30ce137a..a6b91689f0 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -5768,7 +5768,7 @@ ice_cfg_dflt_vsi(struct ice_port_info *pi, u16 vsi_handle, bool set, u8 direction) { struct ice_fltr_list_entry f_list_entry; - struct ice_sw_recipe *recp_list; + struct ice_sw_recipe *recp_list = NULL; struct ice_fltr_info f_info; struct ice_hw *hw = pi->hw; u8 lport = pi->lport; @@ -10091,7 +10091,7 @@ int ice_replay_vsi_all_fltr(struct ice_hw *hw, struct ice_port_info *pi, u16 vsi_handle) { - struct ice_switch_info *sw; + struct ice_switch_info *sw = NULL; int status; u8 i; -- 2.43.0