Skip to content

Commit

Permalink
ice: fix error code in ice_eswitch_attach()
Browse files Browse the repository at this point in the history
Set the "err" variable on this error path.

Fixes: fff292b ("ice: add VF representors one by one")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Link: https://lore.kernel.org/r/e0349ee5-76e6-4ff4-812f-4aa0d3f76ae7@moroto.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Dan Carpenter authored and Jakub Kicinski committed Nov 29, 2023
1 parent 4540c29 commit 1bc9d12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/intel/ice/ice_eswitch.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,10 @@ ice_eswitch_attach(struct ice_pf *pf, struct ice_vf *vf)
ice_eswitch_stop_reprs(pf);

repr = ice_repr_add_vf(vf);
if (IS_ERR(repr))
if (IS_ERR(repr)) {
err = PTR_ERR(repr);
goto err_create_repr;
}

err = ice_eswitch_setup_repr(pf, repr);
if (err)
Expand Down

0 comments on commit 1bc9d12

Please sign in to comment.