kernel/drivers/cpufreq/brcmstb-avs-cpufreq.c
.. .. @@ -434,7 +434,11 @@ 434 434 if (ret) 435 435 return ERR_PTR(ret); 436 436 437 - table = devm_kcalloc(dev, AVS_PSTATE_MAX + 1, sizeof(*table),437 + /*438 + * We allocate space for the 5 different P-STATES AVS,439 + * plus extra space for a terminating element.440 + */441 + table = devm_kcalloc(dev, AVS_PSTATE_MAX + 1 + 1, sizeof(*table),438 442 GFP_KERNEL); 439 443 if (!table) 440 444 return ERR_PTR(-ENOMEM);