linux-bl808/drivers/usb/gadget/udc
Christophe JAILLET 6f15a2a09c usb: bdc: Fix a resource leak in the error handling path of 'bdc_probe()'
If an error occurs after a successful 'clk_prepare_enable()' call, it must
be undone by a corresponding 'clk_disable_unprepare()' call.
This call is already present in the remove function.

Add this call in the error handling path and reorder the code so that the
'clk_prepare_enable()' call happens later in the function.
The goal is to have as much managed resources functions as possible
before the 'clk_prepare_enable()' call in order to keep the error handling
path simple.

While at it, remove the now unneeded 'clk' variable.

Fixes: c87dca0478 ("usb: bdc: Add clock enable for new chips with a separate BDC clock")
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/f8a4a6897deb0c8cb2e576580790303550f15fcd.1629314734.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26 13:34:52 +02:00
..
aspeed-vhub usb: gadget: aspeed: Remove repeated verbose license text 2021-08-26 13:26:07 +02:00
bdc usb: bdc: Fix a resource leak in the error handling path of 'bdc_probe()' 2021-08-26 13:34:52 +02:00
amd5536udc.h
amd5536udc_pci.c
at91_udc.c usb: gadget: udc: at91: add IRQ check 2021-08-13 09:02:34 +02:00
at91_udc.h
atmel_usba_udc.c
atmel_usba_udc.h
bcm63xx_udc.c
core.c
dummy_hcd.c
fotg210-udc.c
fotg210.h
fsl_qe_udc.c usb: gadget: fsl_qe_udc: Fix fall-through warning for Clang 2021-07-14 11:02:37 -05:00
fsl_qe_udc.h
fsl_udc_core.c
fsl_usb2_udc.h
fusb300_udc.c
fusb300_udc.h
goku_udc.c
goku_udc.h
gr_udc.c
gr_udc.h
Kconfig
lpc32xx_udc.c
m66592-udc.c
m66592-udc.h
Makefile
max3420_udc.c usb: gadget: remove leaked entry from udc driver list 2021-07-27 15:54:01 +02:00
mv_u3d.h
mv_u3d_core.c usb: gadget: mv_u3d: request_irq() after initializing UDC 2021-08-18 16:42:09 +02:00
mv_udc.h
mv_udc_core.c
net2272.c
net2272.h
net2280.c
net2280.h
omap_udc.c
omap_udc.h
pch_udc.c
pxa25x_udc.c usb: gadget: pxa25x_udc: Constify static struct pxa25x_ep_ops 2021-07-29 16:57:59 +02:00
pxa25x_udc.h
pxa27x_udc.c
pxa27x_udc.h
r8a66597-udc.c
r8a66597-udc.h
renesas_usb3.c usb: gadget: udc: renesas_usb3: Fix soc_device_match() abuse 2021-08-13 13:05:51 +02:00
s3c-hsudc.c
s3c2410_udc.c usb: gadget: udc: s3c2410: add IRQ check 2021-08-13 09:02:37 +02:00
s3c2410_udc.h
s3c2410_udc_regs.h
snps_udc_core.c
snps_udc_plat.c
tegra-xudc.c usb: gadget: tegra-xudc: fix the wrong mult value for HS isoc or intr 2021-08-13 13:05:50 +02:00
trace.c
trace.h
udc-xilinx.c