diff options
author | Dan Carpenter <[email protected]> | 2023-11-27 15:59:17 +0300 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2023-11-28 20:09:11 -0800 |
commit | 1bc9d12e1c924b76fb71da97db8818eaae5c30a1 (patch) | |
tree | b05bbd5a05a88c10aea103bca6a1f0177e518fb3 | |
parent | 4540c29ab9cc06d9c910e98ff9b13a06f7a3fd21 (diff) |
ice: fix error code in ice_eswitch_attach()
Set the "err" variable on this error path.
Fixes: fff292b47ac1 ("ice: add VF representors one by one")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Wojciech Drewek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_eswitch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.c b/drivers/net/ethernet/intel/ice/ice_eswitch.c index 3f80e2081e5d..ca118bc37e44 100644 --- a/drivers/net/ethernet/intel/ice/ice_eswitch.c +++ b/drivers/net/ethernet/intel/ice/ice_eswitch.c @@ -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) |