Index: uspace/drv/bus/usb/xhci/bus.c
===================================================================
--- uspace/drv/bus/usb/xhci/bus.c	(revision 001778c34eae7203a25008f7c7ed5a4cb4e77c0c)
+++ uspace/drv/bus/usb/xhci/bus.c	(revision 1ed3eb446a3e26cd5f83359306aa7e05b1fc14ad)
@@ -116,5 +116,5 @@
 		return err;
 
-	xhci_endpoint_t *ep0 = xhci_device_get_endpoint(dev, 0);
+	xhci_endpoint_t *ep0 = xhci_endpoint_get(dev->base.endpoints[0]);
 	assert(ep0);
 
Index: uspace/drv/bus/usb/xhci/endpoint.c
===================================================================
--- uspace/drv/bus/usb/xhci/endpoint.c	(revision 001778c34eae7203a25008f7c7ed5a4cb4e77c0c)
+++ uspace/drv/bus/usb/xhci/endpoint.c	(revision 1ed3eb446a3e26cd5f83359306aa7e05b1fc14ad)
@@ -443,19 +443,4 @@
 }
 
-/** Retrieve XHCI endpoint from a device by the endpoint number.
- * @param[in] dev XHCI device to query.
- * @param[in] ep Endpoint number identifying the endpoint to retrieve.
- *
- * @return XHCI endpoint with the specified number or NULL if no such endpoint exists.
- */
-xhci_endpoint_t *xhci_device_get_endpoint(xhci_device_t *dev, usb_endpoint_t ep)
-{
-	endpoint_t *ep_base = dev->base.endpoints[ep];
-	if (!ep_base)
-		return NULL;
-
-	return xhci_endpoint_get(ep_base);
-}
-
 /**
  * @}
Index: uspace/drv/bus/usb/xhci/endpoint.h
===================================================================
--- uspace/drv/bus/usb/xhci/endpoint.h	(revision 001778c34eae7203a25008f7c7ed5a4cb4e77c0c)
+++ uspace/drv/bus/usb/xhci/endpoint.h	(revision 1ed3eb446a3e26cd5f83359306aa7e05b1fc14ad)
@@ -139,6 +139,4 @@
 void xhci_setup_endpoint_context(xhci_endpoint_t *, xhci_ep_ctx_t *);
 
-xhci_endpoint_t * xhci_device_get_endpoint(xhci_device_t *, usb_endpoint_t);
-
 static inline xhci_device_t * xhci_device_get(device_t *dev)
 {
Index: uspace/drv/bus/usb/xhci/isoch.c
===================================================================
--- uspace/drv/bus/usb/xhci/isoch.c	(revision 001778c34eae7203a25008f7c7ed5a4cb4e77c0c)
+++ uspace/drv/bus/usb/xhci/isoch.c	(revision 1ed3eb446a3e26cd5f83359306aa7e05b1fc14ad)
@@ -572,5 +572,5 @@
 }
 
-int isoch_handle_transfer_event(xhci_hc_t *hc, xhci_endpoint_t *ep, xhci_trb_t *trb)
+void isoch_handle_transfer_event(xhci_hc_t *hc, xhci_endpoint_t *ep, xhci_trb_t *trb)
 {
 	assert(ep->base.transfer_type == USB_TRANSFER_ISOCHRONOUS);
@@ -591,5 +591,5 @@
 			fibril_condvar_broadcast(&ep->isoch->avail);
 			fibril_mutex_unlock(&ep->isoch->guard);
-			return EOK;
+			goto out;
 		case XHCI_TRBC_SHORT_PACKET:
 		case XHCI_TRBC_SUCCESS:
@@ -641,7 +641,7 @@
 	timer_schedule_reset(ep);
 
+out:
 	fibril_condvar_broadcast(&ep->isoch->avail);
 	fibril_mutex_unlock(&ep->isoch->guard);
-	return EOK;
 }
 
Index: uspace/drv/bus/usb/xhci/isoch.h
===================================================================
--- uspace/drv/bus/usb/xhci/isoch.h	(revision 001778c34eae7203a25008f7c7ed5a4cb4e77c0c)
+++ uspace/drv/bus/usb/xhci/isoch.h	(revision 1ed3eb446a3e26cd5f83359306aa7e05b1fc14ad)
@@ -123,5 +123,5 @@
 int isoch_schedule_out(xhci_transfer_t *);
 int isoch_schedule_in(xhci_transfer_t *);
-int isoch_handle_transfer_event(xhci_hc_t *, xhci_endpoint_t *, xhci_trb_t *);
+void isoch_handle_transfer_event(xhci_hc_t *, xhci_endpoint_t *, xhci_trb_t *);
 
 #endif
Index: uspace/drv/bus/usb/xhci/transfers.c
===================================================================
--- uspace/drv/bus/usb/xhci/transfers.c	(revision 001778c34eae7203a25008f7c7ed5a4cb4e77c0c)
+++ uspace/drv/bus/usb/xhci/transfers.c	(revision 1ed3eb446a3e26cd5f83359306aa7e05b1fc14ad)
@@ -258,11 +258,12 @@
 
 	const usb_endpoint_t ep_num = ep_dci / 2;
-	xhci_endpoint_t *ep = xhci_device_get_endpoint(dev, ep_num);
-	if (!ep) {
-		usb_log_error("Transfer event on dropped endpoint %u of device "
-		    XHCI_DEV_FMT, ep_num, XHCI_DEV_ARGS(*dev));
+	const usb_endpoint_t dir = ep_dci % 2 ? USB_DIRECTION_IN : USB_DIRECTION_OUT;
+	endpoint_t *ep_base = bus_find_endpoint(&dev->base, ep_num, dir);
+	if (!ep_base) {
+		usb_log_error("Transfer event on dropped endpoint %u %s of device "
+		    XHCI_DEV_FMT, ep_num, usb_str_direction(dir), XHCI_DEV_ARGS(*dev));
 		return ENOENT;
 	}
-	// No need to add reference for endpoint, it is held by the transfer batch.
+	xhci_endpoint_t *ep = xhci_endpoint_get(ep_base);
 
 	/* FIXME: This is racy. Do we care? */
@@ -270,5 +271,7 @@
 
 	if (ep->base.transfer_type == USB_TRANSFER_ISOCHRONOUS) {
-		return isoch_handle_transfer_event(hc, ep, trb);
+		isoch_handle_transfer_event(hc, ep, trb);
+		endpoint_del_ref(&ep->base);
+		return EOK;
 	}
 
@@ -277,4 +280,5 @@
 	if (!batch) {
 		fibril_mutex_unlock(&ep->base.guard);
+		endpoint_del_ref(&ep->base);
 		return ENOENT;
 	}
@@ -305,4 +309,5 @@
 
 	usb_transfer_batch_finish(batch);
+	endpoint_del_ref(&ep->base);
 	return EOK;
 }
