Index: uspace/drv/bus/usb/ehci/hc.c
===================================================================
--- uspace/drv/bus/usb/ehci/hc.c	(revision a6abe20fd11b74238003f7a256e5b942261a3599)
+++ uspace/drv/bus/usb/ehci/hc.c	(revision 26d6f73c8b4157f1c1ca6db4cb55e21b36b4372b)
@@ -334,7 +334,5 @@
 		fibril_mutex_lock(&instance->guard);
 
-		link_t *current = list_first(&instance->pending_batches);
-		while (current && current != &instance->pending_batches.head) {
-			link_t *next = current->next;
+		list_foreach_safe(instance->pending_batches, current, next) {
 			ehci_transfer_batch_t *batch =
 			    ehci_transfer_batch_from_link(current);
@@ -344,5 +342,4 @@
 				ehci_transfer_batch_finish_dispose(batch);
 			}
-			current = next;
 		}
 		fibril_mutex_unlock(&instance->guard);
