xhci: fix oops when xhci resumes from hibernate with hw lpm capable devices
xhci: fix oops when xhci resumes from hibernate with hw lpm capable devices

Resuming from hibernate (S4) will restart and re-initialize xHC.
The device contexts are freed and will be re-allocated later during device reset.

Usb core will disable link pm in device resume before device reset, which will
try to change the max exit latency, accessing the device contexts before they are re-allocated.

There is no need to zero (disable) the max exit latency when disabling hw lpm
for a freshly re-initialized xHC. So check that device context exists before
doing anything. The max exit latency will be set again after device reset when usb core
enables the link pm.

Reported-by: Imre Deak <fbd5edba1988036c8923f0cca0cce6ac4811db29@intel.com>
Tested-by: Imre Deak <fbd5edba1988036c8923f0cca0cce6ac4811db29@intel.com>
Cc: stable <4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org>
Signed-off-by: Mathias Nyman <2d4473c5e67eb83655334d4e9a7757f781607241@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs