summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSaeed Mahameed <saeedm@nvidia.com>2021-03-15 21:27:01 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2021-03-26 05:49:46 +0300
commit6def6e47e24f53a9b1f1666fd36c37088c066cec (patch)
treea1f97baf819cc4e4635dcbc91615c13ff109c2ce /drivers
parent6c996e19949b34d7edebed4f6b0511145c036404 (diff)
downloadlinux-6def6e47e24f53a9b1f1666fd36c37088c066cec.tar.xz
net/mlx5e: alloc the correct size for indirection_rqt
The cited patch allocated the wrong size for the indirection_rqt table, fix that. Fixes: 2119bda642c4 ("net/mlx5e: allocate 'indirection_rqt' buffer dynamically") CC: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_tc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 4bd882a1018c..dbc06c71c170 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -447,11 +447,11 @@ static void mlx5e_hairpin_destroy_transport(struct mlx5e_hairpin *hp)
static int mlx5e_hairpin_fill_rqt_rqns(struct mlx5e_hairpin *hp, void *rqtc)
{
- u32 *indirection_rqt, rqn;
struct mlx5e_priv *priv = hp->func_priv;
int i, ix, sz = MLX5E_INDIR_RQT_SIZE;
+ u32 *indirection_rqt, rqn;
- indirection_rqt = kzalloc(sz, GFP_KERNEL);
+ indirection_rqt = kcalloc(sz, sizeof(*indirection_rqt), GFP_KERNEL);
if (!indirection_rqt)
return -ENOMEM;