Index: uspace/drv/ohci/hc.c
===================================================================
--- uspace/drv/ohci/hc.c	(revision 5a2c42bd0e02f21ac673b0897cc3c6cd7816158b)
+++ uspace/drv/ohci/hc.c	(revision 592369ae7c96d9787cb7de257390fe4ce1afd3ed)
@@ -152,5 +152,5 @@
 	hcd_endpoint_t *hcd_ep = hcd_endpoint_assign(ep);
 	if (hcd_ep == NULL) {
-		free(ep);
+		endpoint_destroy(ep);
 		return ENOMEM;
 	}
@@ -158,4 +158,5 @@
 	ret = usb_endpoint_manager_register_ep(&instance->ep_manager, ep, size);
 	if (ret != EOK) {
+		hcd_endpoint_clear(ep);
 		endpoint_destroy(ep);
 		return ret;
@@ -188,5 +189,5 @@
 	}
 
-	return ret;
+	return EOK;
 }
 /*----------------------------------------------------------------------------*/
@@ -194,8 +195,11 @@
     usb_endpoint_t endpoint, usb_direction_t direction)
 {
+	assert(instance);
+	fibril_mutex_lock(&instance->guard);
 	endpoint_t *ep = usb_endpoint_manager_get_ep(&instance->ep_manager,
 	    address, endpoint, direction, NULL);
 	if (ep == NULL) {
-		usb_log_error("Endpoint unregister failed.\n");
+		usb_log_error("Endpoint unregister failed: No such EP.\n");
+		fibril_mutex_unlock(&instance->guard);
 		return ENOENT;
 	}
@@ -232,6 +236,19 @@
 		usb_log_warning("Endpoint without hcd equivalent structure.\n");
 	}
-	return usb_endpoint_manager_unregister_ep(&instance->ep_manager,
+	int ret = usb_endpoint_manager_unregister_ep(&instance->ep_manager,
 	    address, endpoint, direction);
+	fibril_mutex_unlock(&instance->guard);
+	return ret;
+}
+/*----------------------------------------------------------------------------*/
+endpoint_t * hc_get_endpoint(hc_t *instance, usb_address_t address,
+    usb_endpoint_t endpoint, usb_direction_t direction, size_t *bw)
+{
+	assert(instance);
+	fibril_mutex_lock(&instance->guard);
+	endpoint_t *ep = usb_endpoint_manager_get_ep(&instance->ep_manager,
+	    address, endpoint, direction, bw);
+	fibril_mutex_unlock(&instance->guard);
+	return ep;
 }
 /*----------------------------------------------------------------------------*/
Index: uspace/drv/ohci/hc.h
===================================================================
--- uspace/drv/ohci/hc.h	(revision 5a2c42bd0e02f21ac673b0897cc3c6cd7816158b)
+++ uspace/drv/ohci/hc.h	(revision 592369ae7c96d9787cb7de257390fe4ce1afd3ed)
@@ -85,4 +85,7 @@
     usb_endpoint_t endpoint, usb_direction_t direction);
 
+endpoint_t * hc_get_endpoint(hc_t *instance, usb_address_t address,
+    usb_endpoint_t endpoint, usb_direction_t direction, size_t *bw);
+
 int hc_schedule(hc_t *instance, usb_transfer_batch_t *batch);
 
Index: uspace/drv/ohci/iface.c
===================================================================
--- uspace/drv/ohci/iface.c	(revision 5a2c42bd0e02f21ac673b0897cc3c6cd7816158b)
+++ uspace/drv/ohci/iface.c	(revision 592369ae7c96d9787cb7de257390fe4ce1afd3ed)
@@ -55,5 +55,5 @@
 
 	size_t res_bw;
-	endpoint_t *ep = usb_endpoint_manager_get_ep(&(*hc)->ep_manager,
+	endpoint_t *ep = hc_get_endpoint(*hc,
 	    target.address, target.endpoint, direction, &res_bw);
 	if (ep == NULL) {
