mirror_ubuntu-kernels/drivers/usb/gadget/udc
Dan Carpenter a8291be6b5 Revert "usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init()"
This reverts commit f08aa7c80d.

The reverted commit was based on static analysis and a misunderstanding
of how PTR_ERR() and NULLs are supposed to work.  When a function
returns both pointer errors and NULL then normally the NULL means
"continue operating without a feature because it was deliberately
turned off".  The NULL should not be treated as a failure.  If a driver
cannot work when that feature is disabled then the KConfig should
enforce that the function cannot return NULL.  We should not need to
test for it.

In this driver, the bug means that probe cannot succeed when CONFIG_PM
is disabled.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Fixes: f08aa7c80d ("usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init()")
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/ZKQoBa84U/ykEh3C@moroto
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-25 17:44:37 +02:00
..
aspeed-vhub usb: gadget: aspeed: Convert to platform remove callback returning void 2023-05-28 12:36:25 +01:00
bdc usb: bdc: Convert to platform remove callback returning void 2023-05-28 12:36:25 +01:00
cdns2 usb: cdns2: Fix spelling mistake in a trace message "Wakupe" -> "Wakeup" 2023-06-19 15:34:44 +02:00
amd5536udc_pci.c usb: gadget: udc: fix NULL dereference in remove() 2023-05-29 15:24:24 +01:00
amd5536udc.h USB: gadget: udc: Remove some dead code 2021-10-10 15:12:34 +02:00
aspeed_udc.c usb: gadget: aspeed_udc: fix handling of tx_len == 0 2022-06-29 21:01:54 +02:00
at91_udc.c usb: gadget: at91-udc: simplify at91rm9200_udc_pullup callback 2022-11-09 11:43:11 +01:00
at91_udc.h usb: gadget: at91_udc: Convert to GPIO descriptors 2021-11-17 14:41:15 +01:00
atmel_usba_udc.c usb: gadget/atmel_usba_udc: Convert to platform remove callback returning void 2023-05-28 12:36:25 +01:00
atmel_usba_udc.h
bcm63xx_udc.c usb: gadget/bcm63xx_udc: Convert to platform remove callback returning void 2023-05-28 12:36:25 +01:00
core.c usb: gadget: core: remove unbalanced mutex_unlock in usb_gadget_activate 2023-07-25 17:43:05 +02:00
dummy_hcd.c usb: gadget/dummy_hcd: Convert to platform remove callback returning void 2023-05-28 12:36:25 +01:00
fsl_qe_udc.c usb: gadget/fsl_qe_udc: Convert to platform remove callback returning void 2023-05-28 12:36:25 +01:00
fsl_qe_udc.h
fsl_udc_core.c usb: gadget: udc: do not clear gadget driver.bus 2023-02-02 09:41:17 +01: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 usb: gadget/fusb300_udc: Convert to platform remove callback returning void 2023-05-28 12:36:26 +01:00
fusb300_udc.h
goku_udc.c usb: gadget: udc: do not clear gadget driver.bus 2023-02-02 09:41:17 +01:00
goku_udc.h
gr_udc.c USB: gadget: gr_udc: fix memory leak with using debugfs_lookup() 2023-02-06 13:46:42 +01:00
gr_udc.h
Kconfig usb: cdns2: Add main part of Cadence USBHS driver 2023-06-13 11:59:29 +02:00
lpc32xx_udc.c USB: gadget: lpc32xx_udc: fix memory leak with using debugfs_lookup() 2023-02-06 13:46:42 +01:00
m66592-udc.c usb: gadget/m66592-udc: Convert to platform remove callback returning void 2023-05-28 12:36:26 +01:00
m66592-udc.h
Makefile usb: cdns2: Add main part of Cadence USBHS driver 2023-06-13 11:59:29 +02:00
max3420_udc.c usb: gadget: max3420_udc: drop of_match_ptr for ID table 2023-03-16 12:15:23 +01:00
mv_u3d_core.c usb: gadget/mv_u3d_core: Convert to platform remove callback returning void 2023-05-28 12:36:26 +01:00
mv_u3d.h
mv_udc_core.c usb: gadget/mv_udc_core: Convert to platform remove callback returning void 2023-05-28 12:36:26 +01:00
mv_udc.h
net2272.c usb: gadget/net2272: Convert to platform remove callback returning void 2023-05-28 12:36:26 +01:00
net2272.h USB: UDC: Implement udc_async_callbacks in net2272 2021-06-04 13:52:09 +02:00
net2280.c usb: gadget: udc: do not clear gadget driver.bus 2023-02-02 09:41:17 +01:00
net2280.h USB: UDC: Implement udc_async_callbacks in net2280 2021-06-04 13:52:06 +02:00
omap_udc.c usb: gadget/omap_udc: Convert to platform remove callback returning void 2023-05-28 12:36:26 +01:00
omap_udc.h
pch_udc.c usb: gadget: udc: do not clear gadget driver.bus 2023-02-02 09:41:17 +01:00
pxa25x_udc.c USB / Thunderbolt driver changes for 6.3-rc1 2023-02-24 12:07:00 -08:00
pxa25x_udc.h ARM: pxa: lubbock: pass udc irqs as resource 2022-05-07 22:55:47 +02:00
pxa27x_udc.c USB / Thunderbolt driver updates for 6.5-rc1 2023-07-03 13:23:10 -07:00
pxa27x_udc.h usb: gadget: pxa27x_udc: clean up comment 2022-04-21 19:20:42 +02:00
r8a66597-udc.c usb: gadget/r8a66597-udc: Convert to platform remove callback returning void 2023-05-28 12:36:26 +01:00
r8a66597-udc.h
renesas_usb3.c USB / Thunderbolt driver updates for 6.5-rc1 2023-07-03 13:23:10 -07:00
renesas_usbf.c usb: gadget/renesas_usbf: Convert to platform remove callback returning void 2023-05-28 12:36:27 +01:00
rzv2m_usb3drd.c usb: gadget/rzv2m_usb3drd: Convert to platform remove callback returning void 2023-05-28 12:36:27 +01:00
snps_udc_core.c usb: gadget: udc: do not clear gadget driver.bus 2023-02-02 09:41:17 +01:00
snps_udc_plat.c usb: gadget/snps_udc_plat: Convert to platform remove callback returning void 2023-05-28 12:36:27 +01:00
tegra-xudc.c Revert "usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init()" 2023-07-25 17:44:37 +02:00
trace.c
trace.h usb: gadget: Properly configure the device for remote wakeup 2023-03-29 10:27:00 +02:00
udc-xilinx.c usb: gadget: udc: udc-xilinx: Add identifier to read_fn function arg 2023-06-13 11:55:26 +02:00