Skip to content

Commit d6968bc

Browse files
Tobias Jordangregkh
authored andcommitted
PM / OPP: Add missing of_node_put(np)
commit 7978db344719dab1e56d05e6fc04aaaddcde0a5e upstream. The for_each_available_child_of_node() loop in _of_add_opp_table_v2() doesn't drop the reference to "np" on errors. Fix that. Fixes: 2746590 (PM / OPP: Add support to parse "operating-points-v2" bindings) Signed-off-by: Tobias Jordan <Tobias.Jordan@elektrobit.com> [ VK: Improved commit log. ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent fd3c395 commit d6968bc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/base/power/opp/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,6 +1205,7 @@ static int _of_add_opp_table_v2(struct device *dev, struct device_node *opp_np)
12051205
if (ret) {
12061206
dev_err(dev, "%s: Failed to add OPP, %d\n", __func__,
12071207
ret);
1208+
of_node_put(np);
12081209
goto free_table;
12091210
}
12101211
}

0 commit comments

Comments
 (0)