]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: dwc3: imx8mp: fix device leak at unbind
authorJohan Hovold <johan@kernel.org>
Thu, 24 Jul 2025 09:19:06 +0000 (11:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Jul 2025 08:50:43 +0000 (10:50 +0200)
commit086a0e516f7b3844e6328a5c69e2708b66b0ce18
tree72a5cf1bcd86427348032a4a80ad1395ce769c32
parent22fcf88b02e262d3b41215ebc70912b0482aef95
usb: dwc3: imx8mp: fix device leak at unbind

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>
drivers/usb/dwc3/dwc3-imx8mp.c