Skip to contentSkip to conversation

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

PATCH New Liang He 1 participant 1 message Jul 4, 2022

Subsystems (3)
lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 phy: tegra: Fix missing of_node_put() in tegra210_xusb_padctl_probe()

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")
---
 drivers/phy/tegra/xusb-tegra210.c | 1 +
 1 file changed, 1 insertion(+)
drivers/phy/tegra/xusb-tegra210.c +1 -0
index eedfc7c2cc05..d5eebb7a266c 100644
@@ -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;
Signature · 7 lines
2.25.1


-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy