Axel Lin a9bbb453b5 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>
2017-04-14 18:01:03 +01:00
..
2014-12-14 16:10:09 -08:00
2016-08-16 12:28:00 +01:00
2014-12-14 16:10:09 -08:00
2016-10-07 08:35:35 -07:00
2014-12-14 16:10:09 -08:00