XHCI: Tweak formatting of FinishTransfers logic.

No functional change intended.
This commit is contained in:
Augustin Cavalier 2019-07-20 09:52:14 -04:00
parent 2f044f2aa7
commit 736adc5a11

View File

@ -2802,16 +2802,14 @@ XHCI::FinishTransfers()
TRACE("transfer not successful, actualLength=%" B_PRIuSIZE "\n",
actualLength);
}
if (callbackStatus == B_OK) {
if (directionIn && actualLength > 0) {
TRACE("copying in iov count %ld\n", transfer->VectorCount());
status_t status = transfer->PrepareKernelAccess();
if (status == B_OK) {
ReadDescriptor(td, transfer->Vector(),
transfer->VectorCount());
} else {
callbackStatus = status;
}
if (callbackStatus == B_OK && directionIn && actualLength > 0) {
TRACE("copying in iov count %ld\n", transfer->VectorCount());
status_t status = transfer->PrepareKernelAccess();
if (status == B_OK) {
ReadDescriptor(td, transfer->Vector(),
transfer->VectorCount());
} else {
callbackStatus = status;
}
}
transfer->Finished(callbackStatus, actualLength);