]> 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 17:55:11 +0000 (13:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:24:32 +0000 (16:24 +0200)
commit79c745be310e6c5bd61f8130a21b518982ebe58f
treebd4c11efb84299369b1b907136a5ad3ece1b9d14
parent7b3f0e3b60c27f4fcb69927d84987e5fd6240530
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