regulator: max14577: Add missing of_node_put
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Wed, 5 Feb 2014 16:56:27 +0000 (17:56 +0100)
committerMark Brown <broonie@linaro.org>
Wed, 5 Feb 2014 17:06:13 +0000 (17:06 +0000)
Decrease the reference count for 'regulators' device_node, obtained by
of_get_child_by_name().

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

index b1078ba3f39381338f2691f7585961337cf536c1..186df8785a912483ee84050160649eb7911037c2 100644 (file)
@@ -168,10 +168,11 @@ static int max14577_regulator_dt_parse_pdata(struct platform_device *pdev)
                        MAX14577_REG_MAX);
        if (ret < 0) {
                dev_err(&pdev->dev, "Error parsing regulator init data: %d\n", ret);
-               return ret;
        }
 
-       return 0;
+       of_node_put(np);
+
+       return ret;
 }
 
 static inline struct regulator_init_data *match_init_data(int index)
This page took 0.024901 seconds and 5 git commands to generate.