diff options
| author | Felix Gu <ustc.gu@gmail.com> | 2026-02-12 13:39:19 +0300 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2026-02-27 18:13:29 +0300 |
| commit | 584b457f4166293bdfa50f930228e9fb91a38392 (patch) | |
| tree | 36b7826509442432fefb1188b7cad764613b8a3a | |
| parent | f0cf0a882a02dcf28547f32264f6fd37e9a7b147 (diff) | |
| download | linux-584b457f4166293bdfa50f930228e9fb91a38392.tar.xz | |
phy: ti: j721e-wiz: Fix device node reference leak in wiz_get_lane_phy_types()
The serdes device_node is obtained using of_get_child_by_name(),
which increments the reference count. However, it is never put,
leading to a reference leak.
Add the missing of_node_put() calls to ensure the reference count is
properly balanced.
Fixes: 7ae14cf581f2 ("phy: ti: j721e-wiz: Implement DisplayPort mode to the wiz driver")
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://patch.msgid.link/20260212-wiz-v2-1-6e8bd4cc7a4a@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
| -rw-r--r-- | drivers/phy/ti/phy-j721e-wiz.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c index 6e9ecb88dc8b..6b584706b913 100644 --- a/drivers/phy/ti/phy-j721e-wiz.c +++ b/drivers/phy/ti/phy-j721e-wiz.c @@ -1425,6 +1425,7 @@ static int wiz_get_lane_phy_types(struct device *dev, struct wiz *wiz) dev_err(dev, "%s: Reading \"reg\" from \"%s\" failed: %d\n", __func__, subnode->name, ret); + of_node_put(serdes); return ret; } of_property_read_u32(subnode, "cdns,num-lanes", &num_lanes); @@ -1439,6 +1440,7 @@ static int wiz_get_lane_phy_types(struct device *dev, struct wiz *wiz) } } + of_node_put(serdes); return 0; } |
