android_kernel_oneplus_msm8998/drivers/usb/chipidea
Jisheng Zhang 10b7c3b33c usb: chipidea: properly handle host or gadget initialization failure
[ Upstream commit c4a0bbbdb7f6e3c37fa6deb3ef28c5ed99da6175 ]

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
ci.h usb: chipidea: Only read/write OTGSC from one place 2017-05-14 13:32:56 +02:00
ci_hdrc_imx.c
ci_hdrc_imx.h
ci_hdrc_msm.c
ci_hdrc_pci.c
ci_hdrc_usb2.c
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
host.h
Kconfig
Makefile
otg.c usb: chipidea: vbus event may exist before starting gadget 2017-10-08 10:14:18 +02:00
otg.h
otg_fsm.c
otg_fsm.h
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