Skip to content

Commit 9d6e9f1

Browse files
dlechbebarino
authored andcommitted
clk: ti: dra7-atl: Fix leak of of_nodes
This fix leaking the of_node references in of_dra7_atl_clk_probe(). The docs for of_parse_phandle_with_args() say that the caller must call of_node_put() on the returned node. This adds the missing of_node_put() to fix the leak. Fixes: 9ac33b0 ("CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)") Signed-off-by: David Lechner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent df7e70e commit 9d6e9f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/clk/ti/clk-dra7-atl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
240240
}
241241

242242
clk = of_clk_get_from_provider(&clkspec);
243+
of_node_put(clkspec.np);
243244
if (IS_ERR(clk)) {
244245
pr_err("%s: failed to get atl clock %d from provider\n",
245246
__func__, i);

0 commit comments

Comments
 (0)