diff options
Diffstat (limited to 'drivers/regulator/max14577.c')
-rw-r--r-- | drivers/regulator/max14577.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/regulator/max14577.c b/drivers/regulator/max14577.c index b1078ba3f39..e0619526708 100644 --- a/drivers/regulator/max14577.c +++ b/drivers/regulator/max14577.c @@ -166,12 +166,14 @@ static int max14577_regulator_dt_parse_pdata(struct platform_device *pdev) ret = of_regulator_match(&pdev->dev, np, max14577_regulator_matches, MAX14577_REG_MAX); - if (ret < 0) { + if (ret < 0) dev_err(&pdev->dev, "Error parsing regulator init data: %d\n", ret); - return ret; - } + else + ret = 0; - return 0; + of_node_put(np); + + return ret; } static inline struct regulator_init_data *match_init_data(int index) |