]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: udc: renesas_usb3: fix device leak at unbind
authorJohan Hovold <johan@kernel.org>
Thu, 24 Jul 2025 09:19:08 +0000 (11:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:26:05 +0000 (16:26 +0200)
commitf96815d5156c440433c8a2ab4f4dd7f6c11cb09e
treed7a0a9db8053258346be456701b21e9545b312ae
parentb6f368c1b4bcf13f025a67af5e3276a862affe08
usb: gadget: udc: renesas_usb3: fix device leak at unbind

commit 868837b0a94c6b1b1fdbc04d3ba218ca83432393 upstream.

Make sure to drop the reference to the companion device taken during
probe when the driver is unbound.

Fixes: 39facfa01c9f ("usb: gadget: udc: renesas_usb3: Add register of usb role switch")
Cc: stable@vger.kernel.org # 4.19
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20250724091910.21092-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/renesas_usb3.c