Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 54820f58 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown
Browse files

regulator: s2mps11: Fix NULL pointer of_node value when using platform data



When platform_data is used for regulator (of_node of sec-core MFD device
is NULL) the config.of_node for regulator is not initialized. This NULL
value of config.of_node is later stored during regulator_register().
Thus any call by regulator consumers to of_get_regulator() will fail on
of_parse_phandle() returning NULL.

In this case (using platform_data and parent's driver of_node is NULL)
set the config.of_node to reg_node from platform_data.

Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 07b19808
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment