regulator: max14577: Fix invalid return value on DT parse success
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Fri, 21 Feb 2014 12:12:38 +0000 (13:12 +0100)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 03:00:19 +0000 (12:00 +0900)
commit7ce22b4e804ba8421af0ad39875da3f56f2aaff6
tree8e8928b7824f1db9cbad5c1c25c6489f98994081
parent717d3cede21c0175c6ecf820ad21d74ed7070738
regulator: max14577: Fix invalid return value on DT parse success

This fixes bug introduced in 667a6b7a (regulator: max14577: Add missing
of_node_put). The DTS parsing function returned number of matched
regulators as success status which then was compared against 0 in probe.

Result was a probe fail after successful parsing the DTS:
max14577-regulator: probe of max14577-regulator failed with error 2

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviwed-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/max14577.c