aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnand Moon <[email protected]>2014-09-05 08:38:30 +0530
committerRafael J. Wysocki <[email protected]>2014-09-08 00:02:58 +0200
commitd359992070901bcd774615910d36cec67dbdb1a7 (patch)
tree93ffacd67303516d44d17f477a2e563a9c00cbb4
parent73f1ae8ab08b4972052de7d0358f031ce0343fff (diff)
cpufreq / OPP: Fix the order of arguments for kcalloc()
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) Fixes: 3c5445ce3a0c (cpufreq: OPP: Avoid sleeping while atomic) Signed-off-by: Anand Moon <[email protected]> Acked-by: Viresh Kumar <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
-rw-r--r--drivers/cpufreq/cpufreq_opp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_opp.c b/drivers/cpufreq/cpufreq_opp.c
index f7a32d2326c6..773bcde893c0 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;