Skip to content

Commit

Permalink
cpufreq / OPP: Fix the order of arguments for kcalloc()
Browse files Browse the repository at this point in the history
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: 3c5445c (cpufreq: OPP: Avoid sleeping while atomic)
Signed-off-by: Anand Moon <moon.linux@yahoo.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Anand Moon authored and Rafael J. Wysocki committed Sep 7, 2014
1 parent 73f1ae8 commit d359992
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/cpufreq/cpufreq_opp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d359992

Please sign in to comment.