regulator: mc13xxx: Fix NULL pointer error in non-DT mode
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 25 Feb 2014 11:19:27 +0000 (16:49 +0530)
committerMark Brown <broonie@linaro.org>
Tue, 25 Feb 2014 12:27:59 +0000 (21:27 +0900)
commitbf7f882b1ecef99eedfe36c214458fd457cf7d86
tree3d583b464db48ed78c480a924e12789e9423758a
parentfc5a6e5b0cf107517910b139e3d3af803fa09952
regulator: mc13xxx: Fix NULL pointer error in non-DT mode

Add a check to avoid NULL pointer dereference error when
booted in non-DT mode. While at it also remove the additional
of_node_get which is no longer needed for of_get_child_by_name
and fix the node pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reported-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/mc13xxx-regulator-core.c