[PATCH] phy: tegra: Fix missing of_node_put() in tegra210_xusb_padctl_probe()
Liang He
windhl at 126.com
Mon Jul 4 01:45:14 PDT 2022
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 at gmail.com>
Signed-off-by: Liang He <windhl at 126.com>
---
drivers/phy/tegra/xusb-tegra210.c | 1 +
1 file changed, 1 insertion(+)
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;
--
2.25.1
More information about the linux-phy
mailing list