mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 09:34:17 +00:00
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>
This commit is contained in:
parent
d6255529b2
commit
d1b5c5e235
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user