diff options
author | Axel Lin <axel.lin@ingics.com> | 2017-04-14 05:50:43 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-04-14 20:01:03 +0300 |
commit | a9bbb453b50c91295ab362e4832eb37fd4e6785d (patch) | |
tree | cf548ad6e42a431228f1d360905ef3ad852db6da /arch | |
parent | 9dee7a72d0c7cdfa2573c48b1e5f928c721d54d5 (diff) | |
download | linux-a9bbb453b50c91295ab362e4832eb37fd4e6785d.tar.xz |
regulator: vctrl: Fix out of bounds array access for vctrl->vtable
Current code only allocates rdesc->n_voltages entries for vctrl->vtable.
Thus use rdesc->n_voltages instead of n_voltages in the for loop.
While at it, also switch to use devm_kcalloc instead of devm_kmalloc_array
+ __GFP_ZERO flag and fix the argument order.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions