diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-07-15 11:27:03 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2022-08-22 12:57:09 -0700 |
commit | b868c8fe37bd15def1a8dd0b1f30fca9087e499a (patch) | |
tree | 2ef391e0bfe855a0f5337f501ce666d8ef3d12dc /drivers | |
parent | 550f96432e6f6770efdaee0e65239d61431062a1 (diff) |
net/mlx5: unlock on error path in esw_vfs_changed_event_handler()
Unlock before returning on this error path.
Fixes: f1bc646c9a06 ("net/mlx5: Use devl_ API in mlx5_esw_offloads_devlink_port_register")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c index 10b0b260f02b..a9f4c652f859 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@ -3116,8 +3116,10 @@ esw_vfs_changed_event_handler(struct mlx5_eswitch *esw, const u32 *out) err = mlx5_eswitch_load_vf_vports(esw, new_num_vfs, MLX5_VPORT_UC_ADDR_CHANGE); - if (err) + if (err) { + devl_unlock(devlink); return; + } } esw->esw_funcs.num_vfs = new_num_vfs; devl_unlock(devlink); |