Skip to content

Commit

Permalink
phy: ti: Fix missing of_node_put in ti_pipe3_get_sysctrl()
Browse files Browse the repository at this point in the history
of_parse_phandle() returns node pointer with refcount incremented, use
of_node_put() on it to decrease refcount when done.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Lv Ruyi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
Lv Ruyi authored and vinodkoul committed Apr 11, 2022
1 parent b541f9e commit 751ee15
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/phy/ti/phy-ti-pipe3.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ static int ti_pipe3_get_sysctrl(struct ti_pipe3 *phy)
}

control_pdev = of_find_device_by_node(control_node);
of_node_put(control_node);
if (!control_pdev) {
dev_err(dev, "Failed to get control device\n");
return -EINVAL;
Expand Down

0 comments on commit 751ee15

Please sign in to comment.