linux-uconsole/drivers/usb/chipidea
Jisheng Zhang 10b7c3b33c usb: chipidea: properly handle host or gadget initialization failure
[ Upstream commit c4a0bbbdb7 ]

If ci_hdrc_host_init() or ci_hdrc_gadget_init() returns error and the
error != -ENXIO, as Peter pointed out, "it stands for initialization
for host or gadget has failed", so we'd better return failure rather
continue.

And before destroying the otg, i.e ci_hdrc_otg_destroy(ci), we should
also check ci->roles[CI_ROLE_GADGET].

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-13 19:50:07 +02:00
..
bits.h usb: chipidea: add tx/rx burst size configuration interface 2015-08-14 10:03:58 +08:00
ci.h usb: chipidea: Only read/write OTGSC from one place 2017-05-14 13:32:56 +02:00
ci_hdrc_imx.c Revert "usb: chipidea: imx: enable CI_HDRC_SET_NON_ZERO_TTHA" 2017-02-26 11:07:51 +01:00
ci_hdrc_imx.h
ci_hdrc_msm.c
ci_hdrc_pci.c chipidea: ci_hdrc_pci: use PCI_VDEVICE() instead of PCI_DEVICE() 2015-10-22 09:36:22 +08:00
ci_hdrc_usb2.c usb: chipidea: add xilinx zynq platform data 2015-09-15 16:08:49 +08:00
ci_hdrc_zevio.c
core.c usb: chipidea: properly handle host or gadget initialization failure 2018-04-13 19:50:07 +02:00
debug.c usb: chipidea: debug: check before accessing ci_role 2017-06-14 13:16:22 +02:00
debug.h
host.c usb: chipidea: host: override hcd reset API 2015-08-14 09:13:13 +08:00
host.h usb: chipidea: ehci_init_driver is intended to call one time 2015-07-22 08:03:41 +08:00
Kconfig usb: chipidea: Use extcon framework for VBUS and ID detect 2015-10-22 09:24:25 +08:00
Makefile chipidea: introduce specific Kconfig options for glue drivers 2015-03-26 10:54:39 +01:00
otg.c usb: chipidea: vbus event may exist before starting gadget 2017-10-08 10:14:18 +02:00
otg.h
otg_fsm.c usb: chipidea: otg_fsm: delete the duplicated reset controller operation 2015-08-14 09:13:11 +08:00
otg_fsm.h usb: chipidea: use hrtimer for otg fsm timers 2015-03-26 10:54:39 +01:00
udc.c usb: chipidea: udc: fix NULL pointer dereference if udc_start failed 2017-06-14 13:16:22 +02:00
udc.h
usbmisc_imx.c usb: chipidea: usbmisc_imx: fix a possible NULL dereference 2015-11-18 15:27:12 +08:00