mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
Merge branch 'clk-cleanup' into clk-next
* clk-cleanup: clk: fix an OF node reference leak in of_clk_get_parent_name()
This commit is contained in:
commit
15212db53d
@ -5385,8 +5385,10 @@ const char *of_clk_get_parent_name(const struct device_node *np, int index)
|
||||
count++;
|
||||
}
|
||||
/* We went off the end of 'clock-indices' without finding it */
|
||||
if (of_property_present(clkspec.np, "clock-indices") && !found)
|
||||
if (of_property_present(clkspec.np, "clock-indices") && !found) {
|
||||
of_node_put(clkspec.np);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (of_property_read_string_index(clkspec.np, "clock-output-names",
|
||||
index,
|
||||
|
Loading…
Reference in New Issue
Block a user