Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;