usb: xhci: Return error when host is dead in xhci_disable_slot()
authorLu Baolu <baolu.lu@linux.intel.com>
Thu, 5 Oct 2017 08:21:43 +0000 (11:21 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Dec 2017 12:40:41 +0000 (13:40 +0100)
commit9e99614575b9f1e66249729878a415b9b6659ee7
tree5815b6d07d736de2f3dc62e1245fe87c04a1ad9a
parent8876436aa90d03372a2e6480b9a26d19d225603c
usb: xhci: Return error when host is dead in xhci_disable_slot()

[ Upstream commit dcabc76fa9361186e6b88c30a68db8fa9d5b4a1c ]

xhci_disable_slot() is a helper for disabling a slot when a device
goes away or recovers from error situations. Currently, it returns
success when it sees a dead host. This is not the right way to go.
It should return error and let the invoker know that disable slot
command was failed due to a dead host.

Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().")
Cc: Guoqing Zhang <guoqing.zhang@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.c