From: Krzysztof Kozlowski Date: Wed, 5 Feb 2014 16:56:27 +0000 (+0100) Subject: regulator: max14577: Add missing of_node_put X-Git-Tag: v3.14-rc3~28^2^3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=667a6b7a620ec6e0c1e6689b8c6531c51ce6cdfa;p=platform%2Fkernel%2Flinux-exynos.git regulator: max14577: Add missing of_node_put Decrease the reference count for 'regulators' device_node, obtained by of_get_child_by_name(). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/max14577.c b/drivers/regulator/max14577.c index b1078ba3..186df87 100644 --- a/drivers/regulator/max14577.c +++ b/drivers/regulator/max14577.c @@ -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)