usb: host: xhci: Add NULL check in xhci_find_slot_id_by_port API
There is possibility of xhci_alloc_virt_device() getting scheduled
out before xhci virtual device context stores udev pointer for
new device being enumerated. If root hub suspend kicks in
xhci_bus_suspend() gets called which tries to stop the endpoint for
the same device being enumerated. As a result xhci_find_slot_id API
gets called which tries to access udev to get the device speed and
results into NULL pointer dereference. Fix this issue by adding NULL
check for udev as well.
Change-Id: I80288fdab3dc64333b6619a83ea611507cdac9e5
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Loading
Please register or sign in to comment