Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Link: https://lore.kernel.org/r/20220408095617.2495234-1-lv.ruyi@zte.com.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Lv Ruyi and committed by
Vinod Koul
751ee15d b541f9e5

+1
+1
drivers/phy/ti/phy-ti-pipe3.c
··· 696 696 } 697 697 698 698 control_pdev = of_find_device_by_node(control_node); 699 + of_node_put(control_node); 699 700 if (!control_pdev) { 700 701 dev_err(dev, "Failed to get control device\n"); 701 702 return -EINVAL;