linux/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_pci.c usb: gadget: udc: amd5536udc_pci fix null-ptr-dereference 2021-03-23 13:25:07 +01:00
amd5536udc.h
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 USB: gadget: bcm63xx_udc: remove dentry storage for debugfs file 2021-05-27 09:34:44 +02:00
core.c usb: gadget: udc: core: Introduce check_config to verify USB configuration 2021-07-12 09:37:25 +02:00
dummy_hcd.c USB: UDC: Implement udc_async_callbacks in dummy-hcd 2021-06-04 13:52:02 +02:00
fotg210-udc.c fotg210-udc: Complete OUT requests on short packets 2021-03-26 14:43:47 +01:00
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 usb: gadget: fsl: properly remove remnant of MXC support 2021-06-14 10:31:51 +02:00
fsl_usb2_udc.h usb: gadget: fsl: properly remove remnant of MXC support 2021-06-14 10:31:51 +02:00
fusb300_udc.c
fusb300_udc.h
goku_udc.c
goku_udc.h
gr_udc.c USB: gr_udc: remove dentry storage for debugfs file 2021-06-02 16:41:00 +02:00
gr_udc.h USB: gr_udc: remove dentry storage for debugfs file 2021-06-02 16:41:00 +02:00
Kconfig usb: gadget: fsl_mxc_udc: Remove the driver 2020-12-28 15:41:33 +01:00
lpc32xx_udc.c USB: gadget: lpc32xx_udc: remove debugfs dentry variable 2021-05-21 13:44:40 +02:00
m66592-udc.c
m66592-udc.h
Makefile usb: gadget: fsl_mxc_udc: Remove the driver 2020-12-28 15:41:33 +01:00
max3420_udc.c usb: gadget: remove leaked entry from udc driver list 2021-07-27 15:54:01 +02:00
mv_u3d_core.c usb: gadget: mv_u3d: request_irq() after initializing UDC 2021-08-18 16:42:09 +02:00
mv_u3d.h
mv_udc_core.c USB: gadget: drop irq-flags initialisations 2021-05-21 20:05:56 +02:00
mv_udc.h
net2272.c USB: UDC: Implement udc_async_callbacks in net2272 2021-06-04 13:52:09 +02:00
net2272.h USB: UDC: Implement udc_async_callbacks in net2272 2021-06-04 13:52:09 +02:00
net2280.c USB: UDC: net2280: remove redundant continue statement 2021-06-17 15:31:53 +02:00
net2280.h USB: UDC: Implement udc_async_callbacks in net2280 2021-06-04 13:52:06 +02:00
omap_udc.c
omap_udc.h
pch_udc.c usb: gadget: pch_udc: Convert Intel Quark quirk to use driver data 2021-03-26 14:44:17 +01:00
pxa25x_udc.c usb: gadget: pxa25x_udc: Constify static struct pxa25x_ep_ops 2021-07-29 16:57:59 +02:00
pxa25x_udc.h USB: gadget: pxa25x_udc: remove dentry storage for debugfs file 2021-05-21 13:45:50 +02:00
pxa27x_udc.c usb: gadget: udc: pxa27x_udc: Fix documentation for 'pxa27x_udc_start()' 2021-05-27 09:47:22 +02:00
pxa27x_udc.h USB: gadget: pxa27x_udc: remove dentry storage for debugfs file 2021-05-27 09:35:04 +02:00
r8a66597-udc.c usb: gadget: r8a66597: Add missing null check on return from platform_get_resource 2021-04-09 16:02:26 +02:00
r8a66597-udc.h
renesas_usb3.c usb: gadget: udc: renesas_usb3: Fix soc_device_match() abuse 2021-08-13 13:05:51 +02:00
s3c2410_udc_regs.h
s3c2410_udc.c usb: gadget: udc: s3c2410: add IRQ check 2021-08-13 09:02:37 +02:00
s3c2410_udc.h USB: gadget: s3c2410_udc: remove dentry storage for debugfs file 2021-05-21 13:45:36 +02:00
s3c-hsudc.c usb: gadget: s3c-hsudc: Use struct_size() in devm_kzalloc() 2021-05-21 14:05:27 +02:00
snps_udc_core.c USB: gadget: udc: Process disconnect synchronously 2021-01-19 13:31:25 +01:00
snps_udc_plat.c USB: gadget: udc: fix wrong pointer passed to IS_ERR() and PTR_ERR() 2021-04-02 15:40:38 +02:00
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 USB: gadget: udc: fix kernel-doc syntax in file headers 2021-05-24 15:27:03 +02:00
trace.h USB: gadget: udc: fix kernel-doc syntax in file headers 2021-05-24 15:27:03 +02:00
udc-xilinx.c usb: gadget: udc: udc-xilinx: Place correct function names into the headers 2021-05-27 09:47:22 +02:00