[PATCH] phy: ti: omap-usb2: Fix device node reference leak in omap_usb2_probe

Johan Hovold johan at kernel.org
Tue Oct 28 03:17:39 PDT 2025


On Tue, Oct 28, 2025 at 02:25:06PM +0800, Miaoqian Lin wrote:
> In omap_usb2_probe(), of_parse_phandle() returns a device node with its
> reference count incremented. The caller is responsible for releasing this
> reference when the node is no longer needed.
> 
> Add of_node_put(control_node) after usage to fix the
> reference leak.
> 
> Found via static analysis.
> 
> Fixes: 478b6c7436c2 ("usb: phy: omap-usb2: Don't use omap_get_control_dev()")
> Cc: stable at vger.kernel.org

There should not be any need to backport this one.

> Signed-off-by: Miaoqian Lin <linmq006 at gmail.com>

Other than that, looks good:

Reviewed-by: Johan Hovold <johan at kernel.org>

Johan



More information about the linux-phy mailing list