]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
phy: tegra: xusb: fix device and OF node leak at probe
authorJohan Hovold <johan@kernel.org>
Thu, 24 Jul 2025 13:12:04 +0000 (15:12 +0200)
committerVinod Koul <vkoul@kernel.org>
Tue, 12 Aug 2025 16:00:00 +0000 (21:30 +0530)
commitbca065733afd1e3a89a02f05ffe14e966cd5f78e
treecc92bb0b1e56555273641056cbe5111125140a7b
parent5cfdfc623835d40664f642b75a56d9934f24c5ff
phy: tegra: xusb: fix device and OF node leak at probe

Make sure to drop the references taken to the PMC OF node and device by
of_parse_phandle() and of_find_device_by_node() during probe.

Note the holding a reference to the PMC device does not prevent the
PMC regmap from going away (e.g. if the PMC driver is unbound) so there
is no need to keep the reference.

Fixes: 2d1021487273 ("phy: tegra: xusb: Add wake/sleepwalk for Tegra210")
Cc: stable@vger.kernel.org # 5.14
Cc: JC Kuo <jckuo@nvidia.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250724131206.2211-2-johan@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/tegra/xusb-tegra210.c