Re: [PATCH] phy: ti: omap-usb2: fix OF node leak at probe

From: Manivannan Sadhasivam

Date: Fri Nov 27 2026 - 06:51:12 EST


On 2026-11-09 15:24 +0800, Zhao Feng wrote:
> omap_usb2_probe() obtains a reference to the ctrl-module device node
> with of_parse_phandle() and never drops it, on either the successful
> path or the !control_pdev error path.
>
> Drop the node reference right after of_find_device_by_node(); the
> device reference taken by of_find_device_by_node() keeps the platform
> device alive and is released at unbind by the devm action registered
> below.
>
> Fixes: 478b6c7436c2 ("usb: phy: omap-usb2: Don't use omap_get_control_dev()")
> Signed-off-by: Zhao Feng <zhaofeng2@xxxxxxxxxxxxxxxxxxxx>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>

- Mani