Skip to content
Commit 48a1e1b5 authored by Beniamino Galvani's avatar Beniamino Galvani Committed by Mark Brown
Browse files

regulator: act8865: fix parsing of platform data



The driver loops through all available regulators (ACT8865_REG_NUM)
and accesses pdata->regulators[i].platform_data without checking the
actual value of num_regulators in platform data, potentially causing a
invalid memory access.

Fix this and look up the regulator init_data by id in platform data.

Signed-off-by: default avatarBeniamino Galvani <b.galvani@gmail.com>
Tested-by Wenyou.Yang <wenyou.yang@atmel.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 7171511e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment