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
+1 -3
View File
@@ -2802,8 +2802,7 @@ XHCI::FinishTransfers()
TRACE("transfer not successful, actualLength=%" B_PRIuSIZE "\n", TRACE("transfer not successful, actualLength=%" B_PRIuSIZE "\n",
actualLength); actualLength);
} }
if (callbackStatus == B_OK) { if (callbackStatus == B_OK && directionIn && actualLength > 0) {
if (directionIn && actualLength > 0) {
TRACE("copying in iov count %ld\n", transfer->VectorCount()); TRACE("copying in iov count %ld\n", transfer->VectorCount());
status_t status = transfer->PrepareKernelAccess(); status_t status = transfer->PrepareKernelAccess();
if (status == B_OK) { if (status == B_OK) {
@@ -2813,7 +2812,6 @@ XHCI::FinishTransfers()
callbackStatus = status; callbackStatus = status;
} }
} }
}
transfer->Finished(callbackStatus, actualLength); transfer->Finished(callbackStatus, actualLength);
delete transfer; delete transfer;
FreeDescriptor(td); FreeDescriptor(td);