Index: uspace/drv/bus/usb/ehci/endpoint_list.c
===================================================================
--- uspace/drv/bus/usb/ehci/endpoint_list.c	(revision 1a374967997b33e560720544b0b126a5f689f6b3)
+++ uspace/drv/bus/usb/ehci/endpoint_list.c	(revision f959a20f7a3197accd28bd8cb040895fed7fae3c)
@@ -160,11 +160,13 @@
 	const char *qpos = NULL;
 	qh_t *prev_qh;
+	link_t *prev = list_prev(&ep->eplist_link, &instance->endpoint_list);
+
 	/* Remove from the hardware queue */
-	if (list_first(&instance->endpoint_list) == &ep->eplist_link) {
+	if (!prev) {
 		/* I'm the first one here */
 		prev_qh = instance->list_head;
 		qpos = "FIRST";
 	} else {
-		prev_qh = ehci_endpoint_list_instance(ep->eplist_link.prev)->qh;
+		prev_qh = ehci_endpoint_list_instance(prev)->qh;
 		qpos = "NOT FIRST";
 	}
Index: uspace/drv/bus/usb/ohci/endpoint_list.c
===================================================================
--- uspace/drv/bus/usb/ohci/endpoint_list.c	(revision 1a374967997b33e560720544b0b126a5f689f6b3)
+++ uspace/drv/bus/usb/ohci/endpoint_list.c	(revision f959a20f7a3197accd28bd8cb040895fed7fae3c)
@@ -156,6 +156,7 @@
 	const char *qpos = NULL;
 	ed_t *prev_ed;
+	link_t *prev_link = list_prev(&ep->eplist_link, &instance->endpoint_list);
 	/* Remove from the hardware queue */
-	if (list_first(&instance->endpoint_list) == &ep->eplist_link) {
+	if (!prev_link) {
 		/* I'm the first one here */
 		prev_ed = instance->list_head;
@@ -163,5 +164,5 @@
 	} else {
 		ohci_endpoint_t *prev =
-		    list_get_instance(ep->eplist_link.prev, ohci_endpoint_t, eplist_link);
+		    list_get_instance(prev_link, ohci_endpoint_t, eplist_link);
 		prev_ed = prev->ed;
 		qpos = "NOT FIRST";
Index: uspace/drv/bus/usb/uhci/transfer_list.c
===================================================================
--- uspace/drv/bus/usb/uhci/transfer_list.c	(revision 1a374967997b33e560720544b0b126a5f689f6b3)
+++ uspace/drv/bus/usb/uhci/transfer_list.c	(revision f959a20f7a3197accd28bd8cb040895fed7fae3c)
@@ -233,9 +233,9 @@
 	const char *qpos = "FIRST";
 	qh_t *prev_qh = instance->queue_head;
+	link_t *prev = list_prev(&uhci_batch->link, &instance->batch_list);
 	/* Remove from the hardware queue */
-	if (list_first(&instance->batch_list) != &uhci_batch->link) {
+	if (prev) {
 		/* There is a batch in front of me */
-		prev_qh =
-		    uhci_transfer_batch_from_link(uhci_batch->link.prev)->qh;
+		prev_qh = uhci_transfer_batch_from_link(prev)->qh;
 		qpos = "NOT FIRST";
 	}
