From: Axel Lin Date: Sun, 12 Feb 2012 15:14:39 +0000 (+0000) Subject: mlx4: Fix kcalloc parameters swapped X-Git-Tag: Ubuntu-5.2.0-15.16~18702^2~23 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=758ff235b3f50f0cb391ba3c5e10793305c42f45;p=mirror_ubuntu-eoan-kernel.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c index 55d7bd4e210a..8fa41f3082cf 100644 --- a/drivers/net/ethernet/mellanox/mlx4/eq.c +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c @@ -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;