mlx4: Fix kcalloc parameters swapped
The first parameter should be "number of elements" and the second parameter should be "element size". Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
daef52bab1
commit
758ff235b3
@@ -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;
|
||||||
|
Reference in New Issue
Block a user