提交 758ff235 编写于 作者: A Axel Lin 提交者: 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: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 daef52ba
...@@ -815,8 +815,9 @@ int mlx4_init_eq_table(struct mlx4_dev *dev) ...@@ -815,8 +815,9 @@ int mlx4_init_eq_table(struct mlx4_dev *dev)
int err; int err;
int i; int i;
priv->eq_table.uar_map = kcalloc(sizeof *priv->eq_table.uar_map, priv->eq_table.uar_map = kcalloc(mlx4_num_eq_uar(dev),
mlx4_num_eq_uar(dev), GFP_KERNEL); sizeof *priv->eq_table.uar_map,
GFP_KERNEL);
if (!priv->eq_table.uar_map) { if (!priv->eq_table.uar_map) {
err = -ENOMEM; err = -ENOMEM;
goto err_out_free; goto err_out_free;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册