* [PATCH] mfd: Fix kcalloc parameters swapped
@ 2012-02-12 9:43 Axel Lin
2012-02-23 15:25 ` Samuel Ortiz
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-02-12 9:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Samuel Ortiz
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>
---
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 0f59228..9fc05b9 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;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: Fix kcalloc parameters swapped
2012-02-12 9:43 [PATCH] mfd: Fix kcalloc parameters swapped Axel Lin
@ 2012-02-23 15:25 ` Samuel Ortiz
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2012-02-23 15:25 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel
Hi Axel,
On Sun, Feb 12, 2012 at 05:43:22PM +0800, Axel Lin wrote:
> 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>
Applied, thanks.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-23 15:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-12 9:43 [PATCH] mfd: Fix kcalloc parameters swapped Axel Lin
2012-02-23 15:25 ` Samuel Ortiz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).