* [PATCH Resend] cpufreq_opp: Fixed the order of argument for kcalloc.
@ 2014-09-05 3:08 Viresh Kumar
0 siblings, 0 replies; only message in thread
From: Viresh Kumar @ 2014-09-05 3:08 UTC (permalink / raw)
To: Rafael Wysocki; +Cc: linux-pm, sboyd, moon.linux
From: Anand Moon <moon.linux@yahoo.com>
These changes fix the argument to the kcalloc
@n: number of elements.
@size: element size.
@flags: the type of memory to allocate (see kmalloc).
void *kcalloc(size_t n, size_t size, gfp_t flags)
Signed-off-by: Anand Moon <moon.linux@yahoo.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
---
drivers/cpufreq/cpufreq_opp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/cpufreq_opp.c b/drivers/cpufreq/cpufreq_opp.c
index f7a32d2..773bcde 100644
--- a/drivers/cpufreq/cpufreq_opp.c
+++ b/drivers/cpufreq/cpufreq_opp.c
@@ -60,7 +60,7 @@ int dev_pm_opp_init_cpufreq_table(struct device *dev,
goto out;
}
- freq_table = kcalloc(sizeof(*freq_table), (max_opps + 1), GFP_ATOMIC);
+ freq_table = kcalloc((max_opps + 1), sizeof(*freq_table), GFP_ATOMIC);
if (!freq_table) {
ret = -ENOMEM;
goto out;
--
2.0.3.693.g996b0fd
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-09-05 3:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-05 3:08 [PATCH Resend] cpufreq_opp: Fixed the order of argument for kcalloc Viresh Kumar
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).