aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/mfd-core.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-02-12 04:43:22 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2012-03-06 12:46:43 -0500
commitd1b5c5e2351c5d30327f77226daab21ce9ef427f (patch)
treeb103922c99e586d17ccf6b316c17584ad552041b /drivers/mfd/mfd-core.c
parentd6255529b2639de542324f314b93939b7996a7c5 (diff)
mfd: 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 <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/mfd-core.c')
-rw-r--r--drivers/mfd/mfd-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 0f5922812bff..9fc05b9b0bab 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -162,7 +162,7 @@ int mfd_add_devices(struct device *parent, int id,
162 atomic_t *cnts; 162 atomic_t *cnts;
163 163
164 /* initialize reference counting for all cells */ 164 /* initialize reference counting for all cells */
165 cnts = kcalloc(sizeof(*cnts), n_devs, GFP_KERNEL); 165 cnts = kcalloc(n_devs, sizeof(*cnts), GFP_KERNEL);
166 if (!cnts) 166 if (!cnts)
167 return -ENOMEM; 167 return -ENOMEM;
168 168