Skip to content

Commit 1bc9d12

Browse files
Dan Carpenterkuba-moo
authored andcommitted
ice: fix error code in ice_eswitch_attach()
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>
1 parent 4540c29 commit 1bc9d12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/intel/ice/ice_eswitch.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,10 @@ ice_eswitch_attach(struct ice_pf *pf, struct ice_vf *vf)
669669
ice_eswitch_stop_reprs(pf);
670670

671671
repr = ice_repr_add_vf(vf);
672-
if (IS_ERR(repr))
672+
if (IS_ERR(repr)) {
673+
err = PTR_ERR(repr);
673674
goto err_create_repr;
675+
}
674676

675677
err = ice_eswitch_setup_repr(pf, repr);
676678
if (err)

0 commit comments

Comments
 (0)