Skip to content
Commit 87248991 authored by Boris Brezillon's avatar Boris Brezillon Committed by Thierry Reding
Browse files

regulator: pwm: Properly initialize the ->state field



The ->state field is currently initialized to 0, thus referencing the
voltage selector at index 0, which might not reflect the current
voltage value.
If possible, retrieve the current voltage selector from the PWM state,
else return -EINVAL.

Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: default avatarBrian Norris <briannorris@chromium.org>
Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 3f4eb39b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment