From e5937bd21c8cd7d5d8251bec623f499bd9d799f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Wed, 27 Apr 2011 20:06:28 +0000 Subject: [PATCH] * fixed typo * when removing a transfer, if this was the only one in the list, we set fLastIsochronousTransfer to NULL. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41286 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/busses/usb/uhci.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/uhci.cpp b/src/add-ons/kernel/busses/usb/uhci.cpp index 9cc9139351..33f1d9b7a2 100644 --- a/src/add-ons/kernel/busses/usb/uhci.cpp +++ b/src/add-ons/kernel/busses/usb/uhci.cpp @@ -1016,7 +1016,7 @@ UHCI::SubmitIsochronous(Transfer *transfer) // The overhead is not worthy. uint16 bandwidth = transfer->Bandwidth() / isochronousData->packet_count; - TRACE("isochronous transfer descriptor bandwdith %d\n", bandwidth); + TRACE("isochronous transfer descriptor bandwidth %d\n", bandwidth); // The following holds the list of transfer descriptor of the // isochronous request. It is used to quickly remove all the isochronous @@ -1543,9 +1543,11 @@ UHCI::FinishIsochronousTransfers() // Remove the transfer if (LockIsochronous()) { - if (transfer == fFirstIsochronousTransfer) + if (transfer == fFirstIsochronousTransfer) { fFirstIsochronousTransfer = transfer->link; - else { + if (transfer == fLastIsochronousTransfer) + fLastIsochronousTransfer = NULL; + } else { isochronous_transfer_data *temp = fFirstIsochronousTransfer; while (transfer != temp->link)