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",
actualLength);
}
if (callbackStatus == B_OK) {
if (directionIn && actualLength > 0) {
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) {
@@ -2813,7 +2812,6 @@ XHCI::FinishTransfers()
callbackStatus = status;
}
}
}
transfer->Finished(callbackStatus, actualLength);
delete transfer;
FreeDescriptor(td);