linux-stable/drivers/usb/dwc2
Miaoqian Lin 701d8ec01e usb: dwc2: Fix memory leak in dwc2_hcd_init
commit 3755278f07 upstream.

usb_create_hcd will alloc memory for hcd, and we should
call usb_put_hcd to free it when platform_get_resource()
fails to prevent memory leak.
goto error2 label instead error1 to fix this.

Fixes: 856e6e8e0f ("usb: dwc2: check return value after calling platform_get_resource()")
Cc: stable <stable@kernel.org>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220530085413.44068-1-linmq006@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-22 14:22:03 +02:00
..
core.c usb: dwc2: Fix spelling mistake "was't" -> "wasn't" 2021-08-27 10:29:54 +02:00
core.h usb: dwc2: drd: fix soft connect when gadget is unconfigured 2022-03-02 11:48:05 +01:00
core_intr.c usb: dwc2: Skip clock gating on Samsung SoCs 2021-07-21 09:50:27 +02:00
debug.h
debugfs.c usb: dwc2: Add STM32 related debugfs entries 2021-03-10 09:37:15 +01:00
drd.c usb: dwc2: drd: fix soft connect when gadget is unconfigured 2022-03-02 11:48:05 +01:00
gadget.c usb: dwc2: gadget: don't reset gadget's driver->bus 2022-06-14 18:36:21 +02:00
hcd.c usb: dwc2: Fix memory leak in dwc2_hcd_init 2022-06-22 14:22:03 +02:00
hcd.h
hcd_ddma.c
hcd_intr.c
hcd_queue.c usb: dwc2: hcd_queue: Fix use of floating point literal 2021-12-01 09:04:39 +01:00
hw.h usb: dwc2: Update enter and exit partial power down functions 2021-04-09 15:16:38 +02:00
Kconfig
Makefile
params.c usb: dwc2: Skip clock gating on Samsung SoCs 2021-07-21 09:50:27 +02:00
pci.c usb: dwc2: pci: Fix possible copy/paste issue 2021-05-27 09:45:27 +02:00
platform.c usb: dwc2: fix STM ID/VBUS detection startup delay in dwc2_driver_probe 2021-12-22 09:32:46 +01:00