diff mbox series

phy: tegra: Fix missing of_node_put() in tegra210_xusb_padctl_probe()

Message ID 20220704084514.277005-1-windhl@126.com
State Not Applicable
Headers show
Series phy: tegra: Fix missing of_node_put() in tegra210_xusb_padctl_probe() | expand

Commit Message

Liang He July 4, 2022, 8:45 a.m. UTC
We should call of_node_put() for the reference 'np' returned by
of_parse_phandle() which will increase the refcount.

Fixes: 2d1021487273 ("phy: tegra: xusb: Add wake/sleepwalk for Tegra210")
Co-authored-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Liang He <windhl@126.com>
---
 drivers/phy/tegra/xusb-tegra210.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/phy/tegra/xusb-tegra210.c b/drivers/phy/tegra/xusb-tegra210.c
index eedfc7c2cc05..d5eebb7a266c 100644
--- a/drivers/phy/tegra/xusb-tegra210.c
+++ b/drivers/phy/tegra/xusb-tegra210.c
@@ -3165,6 +3165,7 @@  tegra210_xusb_padctl_probe(struct device *dev,
 	}
 
 	pdev = of_find_device_by_node(np);
+	of_node_put(np);
 	if (!pdev) {
 		dev_warn(dev, "PMC device is not available\n");
 		goto out;