Commit 758ff235 authored by Axel Lin's avatar Axel Lin Committed by David S. Miller

mlx4: Fix kcalloc parameters swapped

The first parameter should be "number of elements" and the second parameter
should be "element size".
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent daef52ba
......@@ -815,8 +815,9 @@ int mlx4_init_eq_table(struct mlx4_dev *dev)
int err;
int i;
priv->eq_table.uar_map = kcalloc(sizeof *priv->eq_table.uar_map,
mlx4_num_eq_uar(dev), GFP_KERNEL);
priv->eq_table.uar_map = kcalloc(mlx4_num_eq_uar(dev),
sizeof *priv->eq_table.uar_map,
GFP_KERNEL);
if (!priv->eq_table.uar_map) {
err = -ENOMEM;
goto err_out_free;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment