usb: dwc3: rockchip: fix otg plug out error before resume
authorMeng Dongyang <daniel.meng@rock-chips.com>
Fri, 7 Oct 2016 05:50:59 +0000 (13:50 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 13 Oct 2016 02:22:27 +0000 (10:22 +0800)
commitccc954ee9f8859569fe16cc17b598fbfece07ae8
treec4469b8ab0e38630c68713d1f1ee76bdda1fed11
parent22e5631e6317f91a286be17d940efbb2563171f4
usb: dwc3: rockchip: fix otg plug out error before resume

ID dig disconnect interrupt will happen and notify dwc3 controller
to remove hcd as soon as resume, and release root hub, but the hcd
has not resume, so there is a logic error and it may result in NULL
pointer, this patch forbid remove hcd when the state of hcd is suspend.

Change-Id: Ia5673848a23528cd053d75910c0fdbddf0927a40
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
drivers/usb/dwc3/dwc3-rockchip.c