linux/drivers/usb/dwc2
Miaoqian Lin 3755278f07 usb: dwc2: Fix memory leak in dwc2_hcd_init
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-10 11:12:20 +02:00
..
core_intr.c usb: dwc2: Skip clock gating on Samsung SoCs 2021-07-21 09:50:27 +02:00
core.c USB: dwc2: Add OTG support for Ingenic SoCs. 2022-04-21 19:22:00 +02:00
core.h USB: dwc2: Add OTG support for Ingenic SoCs. 2022-04-21 19:22:00 +02:00
debug.h USB: dwc2: Use the correct style for SPDX License Identifier 2020-05-05 10:58:50 +03:00
debugfs.c usb: dwc2: add otg_rev and otg_caps information for gadget driver 2021-10-25 09:20:26 +02:00
drd.c usb: dwc2: drd: fix soft connect when gadget is unconfigured 2022-02-17 16:10:21 +01:00
gadget.c usb: dwc2: gadget: don't reset gadget's driver->bus 2022-05-05 21:52:16 +02:00
hcd_ddma.c usb: dwc2: Modify dwc2_readl/writel functions prototype 2018-07-30 10:39:16 +03:00
hcd_intr.c usb: dwc2: Make "trimming xfer length" a debug message 2021-01-26 18:42:15 +01:00
hcd_queue.c usb: dwc2: hcd_queue: Fix use of floating point literal 2021-11-17 15:03:34 +01:00
hcd.c usb: dwc2: Fix memory leak in dwc2_hcd_init 2022-06-10 11:12:20 +02:00
hcd.h USB: dwc2: Use the correct style for SPDX License Identifier 2020-05-05 10:58:50 +03:00
hw.h usb: dwc2: Update enter and exit partial power down functions 2021-04-09 15:16:38 +02:00
Kconfig usb: dwc2: override PHY input signals with usb role switch support 2020-10-02 13:29:13 +03:00
Makefile usb: dwc2: override PHY input signals with usb role switch support 2020-10-02 13:29:13 +03:00
params.c USB: dwc2: Add OTG support for Ingenic SoCs. 2022-04-21 19:22:00 +02:00
pci.c usb: dwc2: pci: Fix possible copy/paste issue 2021-05-27 09:45:27 +02:00
platform.c Linux 5.16-rc6 2021-12-20 09:58:10 +01:00