usb: dwc3: fix logical error during controller probe
authorMeng Dongyang <daniel.meng@rock-chips.com>
Sun, 11 Sep 2016 08:27:57 +0000 (16:27 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 23 Sep 2016 10:26:06 +0000 (18:26 +0800)
commit5c2303a10bc74ed8cff61e9c54a51cbd74a8cabe
tree0e7ecea25f89cf5455339ce40a8dec83d413a255
parentfe2fc59322701886c63c652d8dd94f679a05dba4
usb: dwc3: fix logical error during controller probe

The probe function of usb controller will remove hcd struct in host
or otg mode, while the hcd is alloced after xhci driver registed. So
there is a logical error if xhci driver is registed after usb
controller and it results in the pointer of hcd point to NULL. This
patch make usb controller probe again if hcd point to NULL.

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