Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3599920 authored by Anand Moon's avatar Anand Moon Committed by Rafael J. Wysocki
Browse files

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: 3c5445ce (cpufreq: OPP: Avoid sleeping while atomic)
Signed-off-by: default avatarAnand Moon <moon.linux@yahoo.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 73f1ae8a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;