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:
Stephen Boyd 2024-12-10 14:56:08 -08:00
commit 15212db53d

View File

@ -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,