Skip to content

Commit c7ebe23

Browse files
Dan Carpenterdavem330
authored andcommitted
net/mlx5: Lag, fix a potential Oops with mlx5_lag_create_definer()
There is a minus character missing from ERR_PTR(ENOMEM) so if this allocation fails it will lead to an Oops in the caller. Fixes: dc48516 ("net/mlx5: Lag, add support to create definers for LAG") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 721111b commit c7ebe23

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/lag

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ mlx5_lag_create_definer(struct mlx5_lag *ldev, enum netdev_lag_hash hash,
289289

290290
lag_definer = kzalloc(sizeof(*lag_definer), GFP_KERNEL);
291291
if (!lag_definer)
292-
return ERR_PTR(ENOMEM);
292+
return ERR_PTR(-ENOMEM);
293293

294294
match_definer_mask = kvzalloc(MLX5_FLD_SZ_BYTES(match_definer,
295295
match_mask),

0 commit comments

Comments
 (0)