aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_mc.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-01-26 14:24:00 -0500
committerBorislav Petkov <bp@suse.de>2013-01-30 05:38:25 -0500
commitd3d09e18203dba16a9dbdb2b4cc673d90748cdd1 (patch)
tree9467587d975dff0a1302da376030c4d60509c76b /drivers/edac/edac_mc.c
parent8024c4c0b1057d1cd811fc9c3f88f81de9729fcd (diff)
EDAC: Fix kcalloc argument order
First number, then size. Signed-off-by: Joe Perches <joe@perches.com> Cc: <stable@vger.kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac/edac_mc.c')
-rw-r--r--drivers/edac/edac_mc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 281f566a5513..d1e9eb191f2b 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -340,7 +340,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
340 /* 340 /*
341 * Alocate and fill the csrow/channels structs 341 * Alocate and fill the csrow/channels structs
342 */ 342 */
343 mci->csrows = kcalloc(sizeof(*mci->csrows), tot_csrows, GFP_KERNEL); 343 mci->csrows = kcalloc(tot_csrows, sizeof(*mci->csrows), GFP_KERNEL);
344 if (!mci->csrows) 344 if (!mci->csrows)
345 goto error; 345 goto error;
346 for (row = 0; row < tot_csrows; row++) { 346 for (row = 0; row < tot_csrows; row++) {
@@ -351,7 +351,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
351 csr->csrow_idx = row; 351 csr->csrow_idx = row;
352 csr->mci = mci; 352 csr->mci = mci;
353 csr->nr_channels = tot_channels; 353 csr->nr_channels = tot_channels;
354 csr->channels = kcalloc(sizeof(*csr->channels), tot_channels, 354 csr->channels = kcalloc(tot_channels, sizeof(*csr->channels),
355 GFP_KERNEL); 355 GFP_KERNEL);
356 if (!csr->channels) 356 if (!csr->channels)
357 goto error; 357 goto error;
@@ -369,7 +369,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
369 /* 369 /*
370 * Allocate and fill the dimm structs 370 * Allocate and fill the dimm structs
371 */ 371 */
372 mci->dimms = kcalloc(sizeof(*mci->dimms), tot_dimms, GFP_KERNEL); 372 mci->dimms = kcalloc(tot_dimms, sizeof(*mci->dimms), GFP_KERNEL);
373 if (!mci->dimms) 373 if (!mci->dimms)
374 goto error; 374 goto error;
375 375