[PATCH] phy: tegra: Fix missing of_node_put() in tegra210_xusb_padctl_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Signed-off-by: Liang He <windhl@xxxxxxx>
---
 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




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux