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: NBoris Brezillon <boris.brezillon@free-electrons.com> Tested-by: NBrian Norris <briannorris@chromium.org> Tested-by: NHeiko Stuebner <heiko@sntech.de> Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
Showing
想要评论请 注册 或 登录