Message ID | 20210603201155.109184-4-saeed@kernel.org |
---|---|
State | New |
Headers | show |
Series | mlx5 updates 2021-06-03 | expand |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.c index 526fbb669142..c14590acc772 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.c @@ -27,6 +27,8 @@ int mlx5_ft_pool_init(struct mlx5_core_dev *dev) int i; ft_pool = kzalloc(sizeof(*ft_pool), GFP_KERNEL); + if (!ft_pool) + return -ENOMEM; for (i = ARRAY_SIZE(FT_POOLS) - 1; i >= 0; i--) ft_pool->ft_left[i] = FT_SIZE / FT_POOLS[i];