treewide: kzalloc() -> kcalloc()
[linux-2.6-microblaze.git] / drivers / net / ethernet / mellanox / mlx4 / main.c
index 0a30d81..8720147 100644 (file)
@@ -2982,7 +2982,8 @@ static int mlx4_init_steering(struct mlx4_dev *dev)
        int num_entries = dev->caps.num_ports;
        int i, j;
 
-       priv->steer = kzalloc(sizeof(struct mlx4_steer) * num_entries, GFP_KERNEL);
+       priv->steer = kcalloc(num_entries, sizeof(struct mlx4_steer),
+                             GFP_KERNEL);
        if (!priv->steer)
                return -ENOMEM;
 
@@ -3103,7 +3104,7 @@ static u64 mlx4_enable_sriov(struct mlx4_dev *dev, struct pci_dev *pdev,
                }
        }
 
-       dev->dev_vfs = kzalloc(total_vfs * sizeof(*dev->dev_vfs), GFP_KERNEL);
+       dev->dev_vfs = kcalloc(total_vfs, sizeof(*dev->dev_vfs), GFP_KERNEL);
        if (NULL == dev->dev_vfs) {
                mlx4_err(dev, "Failed to allocate memory for VFs\n");
                goto disable_sriov;