Commit 1bc9d12e authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski

ice: fix error code in ice_eswitch_attach()

Set the "err" variable on this error path.

Fixes: fff292b4 ("ice: add VF representors one by one")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
Link: https://lore.kernel.org/r/e0349ee5-76e6-4ff4-812f-4aa0d3f76ae7@moroto.mountainSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 4540c29a
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment