xhci: handle failed buffer copy to URB sg list and fix a W=1 copiler warning
authorMathias Nyman <mathias.nyman@linux.intel.com>
Thu, 17 Jun 2021 15:03:53 +0000 (18:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:02:10 +0000 (16:02 +0200)
commit91ab5c64a848e090d44e4ed45c245a628c211a07
tree099043c623ef65be5cd51990580667ddd005ddc2
parenta35f81d458e1d3d9465e9321c103377746b804f4
xhci: handle failed buffer copy to URB sg list and fix a W=1 copiler warning

[ Upstream commit 271a21d8b280b186f8cc9ca6f7151902efde9512 ]

Set the urb->actual_length to bytes successfully copied in case all bytes
weren't copied from a temporary buffer to the URB sg list.
Also print a debug message

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20210617150354.1512157-4-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/host/xhci.c