]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: dwc3: imx8mp: fix device leak at unbind
authorJohan Hovold <johan@kernel.org>
Thu, 21 Aug 2025 16:28:22 +0000 (12:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:42 +0000 (16:28 +0200)
commitdc35f594b0d28b1fdde6785da66ec0a1f87d56c7
tree2c52b8d92e4bd8e56a1bf55bdafe2f5cf8df87e6
parent1636b5e9c3543b87d673e32a47e7c18698882425
usb: dwc3: imx8mp: fix device leak at unbind

[ Upstream commit 086a0e516f7b3844e6328a5c69e2708b66b0ce18 ]

Make sure to drop the reference to the dwc3 device taken by
of_find_device_by_node() on probe errors and on driver unbind.

Fixes: 6dd2565989b4 ("usb: dwc3: add imx8mp dwc3 glue layer driver")
Cc: stable@vger.kernel.org # 5.12
Cc: Li Jun <jun.li@nxp.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20250724091910.21092-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/dwc3-imx8mp.c