diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-30 06:32:48 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-30 06:32:48 -0500 |
| commit | a56e16009855b2b528c36aa56b7ab8b209bb15e0 (patch) | |
| tree | 2e3aad3eae2b6e3f6f619b4f819cfa1c89b4c8cb | |
| parent | 58ff603becda8e414a0643f5b7a384ada74d51f3 (diff) | |
| parent | d3d09e18203dba16a9dbdb2b4cc673d90748cdd1 (diff) | |
Merge tag 'edac_for_3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Pull EDAC fixlets from Borislav Petkov:
"Two minor correctness fixlets from Dan Carpenter and Joe Perches each."
* tag 'edac_for_3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
EDAC: Fix kcalloc argument order
EDAC: Test correct variable in ->store function
| -rw-r--r-- | drivers/edac/edac_mc.c | 6 | ||||
| -rw-r--r-- | drivers/edac/edac_pci_sysfs.c | 2 |
2 files changed, 4 insertions, 4 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 | ||
diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c index dc6e905ee1a5..0056c4dae9d5 100644 --- a/drivers/edac/edac_pci_sysfs.c +++ b/drivers/edac/edac_pci_sysfs.c | |||
| @@ -256,7 +256,7 @@ static ssize_t edac_pci_dev_store(struct kobject *kobj, | |||
| 256 | struct edac_pci_dev_attribute *edac_pci_dev; | 256 | struct edac_pci_dev_attribute *edac_pci_dev; |
| 257 | edac_pci_dev = (struct edac_pci_dev_attribute *)attr; | 257 | edac_pci_dev = (struct edac_pci_dev_attribute *)attr; |
| 258 | 258 | ||
| 259 | if (edac_pci_dev->show) | 259 | if (edac_pci_dev->store) |
| 260 | return edac_pci_dev->store(edac_pci_dev->value, buffer, count); | 260 | return edac_pci_dev->store(edac_pci_dev->value, buffer, count); |
| 261 | return -EIO; | 261 | return -EIO; |
| 262 | } | 262 | } |
