aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/power/opp.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/power/opp.rst')
-rw-r--r--Documentation/power/opp.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/power/opp.rst b/Documentation/power/opp.rst
index a7c03c4709807..1b7f1d854f14a 100644
--- a/Documentation/power/opp.rst
+++ b/Documentation/power/opp.rst
@@ -305,7 +305,7 @@ dev_pm_opp_get_opp_count
{
/* Do things */
num_available = dev_pm_opp_get_opp_count(dev);
- speeds = kzalloc(sizeof(u32) * num_available, GFP_KERNEL);
+ speeds = kcalloc(num_available, sizeof(u32), GFP_KERNEL);
/* populate the table in increasing order */
freq = 0;
while (!IS_ERR(opp = dev_pm_opp_find_freq_ceil(dev, &freq))) {