The allocation size must be be_max_uc() and not "be_max_uc() + 1"
Signed-off-by: Ravikumar Nelavelli <ravikumar.nelavelli@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
        if (status)
                return status;
 
-       /* primary mac needs 1 pmac entry */
-       adapter->pmac_id = kcalloc(be_max_uc(adapter) + 1, sizeof(u32),
-                                  GFP_KERNEL);
+       adapter->pmac_id = kcalloc(be_max_uc(adapter),
+                                  sizeof(*adapter->pmac_id), GFP_KERNEL);
        if (!adapter->pmac_id)
                return -ENOMEM;