diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-02-12 17:43:22 +0800 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-03-06 18:46:43 +0100 |
commit | d1b5c5e2351c5d30327f77226daab21ce9ef427f (patch) | |
tree | b103922c99e586d17ccf6b316c17584ad552041b /drivers | |
parent | d6255529b2639de542324f314b93939b7996a7c5 (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')
-rw-r--r-- | drivers/mfd/mfd-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 0f5922812bf..9fc05b9b0ba 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, atomic_t *cnts; /* initialize reference counting for all cells */ - cnts = kcalloc(sizeof(*cnts), n_devs, GFP_KERNEL); + cnts = kcalloc(n_devs, sizeof(*cnts), GFP_KERNEL); if (!cnts) return -ENOMEM; |