Commit 751ee15d authored by Lv Ruyi's avatar Lv Ruyi Committed by Vinod Koul

phy: ti: Fix missing of_node_put in ti_pipe3_get_sysctrl()

of_parse_phandle() returns node pointer with refcount incremented, use
of_node_put() on it to decrease refcount when done.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarLv Ruyi <lv.ruyi@zte.com.cn>
Link: https://lore.kernel.org/r/20220408095617.2495234-1-lv.ruyi@zte.com.cnSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent b541f9e5
...@@ -696,6 +696,7 @@ static int ti_pipe3_get_sysctrl(struct ti_pipe3 *phy) ...@@ -696,6 +696,7 @@ static int ti_pipe3_get_sysctrl(struct ti_pipe3 *phy)
} }
control_pdev = of_find_device_by_node(control_node); control_pdev = of_find_device_by_node(control_node);
of_node_put(control_node);
if (!control_pdev) { if (!control_pdev) {
dev_err(dev, "Failed to get control device\n"); dev_err(dev, "Failed to get control device\n");
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment