Skip to content

Commit

Permalink
regulator: max14577: Add missing of_node_put
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Krzysztof Kozlowski authored and Mark Brown committed Feb 5, 2014
1 parent 38dbfb5 commit 667a6b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/regulator/max14577.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 667a6b7

Please sign in to comment.