Index: uspace/drv/ohci/hc.c
===================================================================
--- uspace/drv/ohci/hc.c	(revision 7ab7c7f682acb2b85b576ebffa9c394b68bd0feb)
+++ uspace/drv/ohci/hc.c	(revision 62265ce4a17948e39e68b43102deba3223a20599)
@@ -95,6 +95,5 @@
 }
 /*----------------------------------------------------------------------------*/
-int hc_init(hc_t *instance, ddf_fun_t *fun, ddf_dev_t *dev,
-    uintptr_t regs, size_t reg_size, bool interrupts)
+int hc_init(hc_t *instance, uintptr_t regs, size_t reg_size, bool interrupts)
 {
 	assert(instance);
Index: uspace/drv/ohci/hc.h
===================================================================
--- uspace/drv/ohci/hc.h	(revision 7ab7c7f682acb2b85b576ebffa9c394b68bd0feb)
+++ uspace/drv/ohci/hc.h	(revision 62265ce4a17948e39e68b43102deba3223a20599)
@@ -77,6 +77,5 @@
 int hc_register_hub(hc_t *instance, ddf_fun_t *hub_fun);
 
-int hc_init(hc_t *instance, ddf_fun_t *fun, ddf_dev_t *dev,
-     uintptr_t regs, size_t reg_size, bool interrupts);
+int hc_init(hc_t *instance, uintptr_t regs, size_t reg_size, bool interrupts);
 
 void hc_start_hw(hc_t *instance);
Index: uspace/drv/ohci/main.c
===================================================================
--- uspace/drv/ohci/main.c	(revision 7ab7c7f682acb2b85b576ebffa9c394b68bd0feb)
+++ uspace/drv/ohci/main.c	(revision 62265ce4a17948e39e68b43102deba3223a20599)
@@ -69,5 +69,5 @@
 	}
 
-	int ret = ohci_init(ohci, device);
+	int ret = device_setup_ohci(device, ohci);
 	if (ret != EOK) {
 		usb_log_error("Failed to initialize OHCI driver: %s.\n",
Index: uspace/drv/ohci/ohci.c
===================================================================
--- uspace/drv/ohci/ohci.c	(revision 7ab7c7f682acb2b85b576ebffa9c394b68bd0feb)
+++ uspace/drv/ohci/ohci.c	(revision 62265ce4a17948e39e68b43102deba3223a20599)
@@ -127,16 +127,34 @@
  *  - registers interrupt handler
  */
-int ohci_init(ohci_t *instance, ddf_dev_t *device)
+int device_setup_ohci(ddf_dev_t *device, ohci_t *instance)
 {
 	assert(instance);
-	instance->hc_fun = NULL;
-	instance->rh_fun = NULL;
+
+	instance->hc_fun = ddf_fun_create(device, fun_exposed, "ohci-hc");
+	if (instance->hc_fun == NULL) {
+		usb_log_error("Failed to create HC function.\n");
+		return ENOMEM;
+	}
+	instance->hc_fun->ops = &hc_ops;
+	instance->hc_fun->driver_data = &instance->hc;
+
+	instance->rh_fun = ddf_fun_create(device, fun_inner, "ohci-rh");
+	if (instance->rh_fun == NULL) {
+		ddf_fun_destroy(instance->hc_fun);
+		usb_log_error("Failed to create RH function.\n");
+		return ENOMEM;
+	}
+	instance->rh_fun->ops = &rh_ops;
+	instance->rh_fun->driver_data = NULL;
+
 #define CHECK_RET_DEST_FUN_RETURN(ret, message...) \
 if (ret != EOK) { \
 	usb_log_error(message); \
-	if (instance->hc_fun) \
-		ddf_fun_destroy(instance->hc_fun); \
-	if (instance->rh_fun) \
-		ddf_fun_destroy(instance->rh_fun); \
+	instance->hc_fun->ops = NULL; \
+	instance->hc_fun->driver_data = NULL; \
+	instance->rh_fun->ops = NULL; \
+	instance->rh_fun->driver_data = NULL; \
+	ddf_fun_destroy(instance->hc_fun); \
+	ddf_fun_destroy(instance->rh_fun); \
 	return ret; \
 }
@@ -156,5 +174,5 @@
 	bool interrupts = false;
 #ifdef CONFIG_USBHC_NO_INTERRUPTS
-	usb_log_warning("Interrupts disabled in OS config, " \
+	usb_log_warning("Interrupts disabled in OS config, "
 	    "falling back to polling.\n");
 #else
@@ -163,5 +181,5 @@
 		usb_log_warning("Failed to enable interrupts: %s.\n",
 		    str_error(ret));
-		usb_log_info("HW interrupts not available, " \
+		usb_log_info("HW interrupts not available, "
 		    "falling back to polling.\n");
 	} else {
@@ -171,29 +189,11 @@
 #endif
 
-	instance->hc_fun = ddf_fun_create(device, fun_exposed, "ohci-hc");
-	ret = (instance->hc_fun == NULL) ? ENOMEM : EOK;
-	CHECK_RET_DEST_FUN_RETURN(ret,
-	    "Failed(%d) to create HC function.\n", ret);
-
-	ret = hc_init(&instance->hc, instance->hc_fun, device,
-	    mem_reg_base, mem_reg_size, interrupts);
+	ret = hc_init(&instance->hc, mem_reg_base, mem_reg_size, interrupts);
 	CHECK_RET_DEST_FUN_RETURN(ret, "Failed(%d) to init ohci-hcd.\n", ret);
-	instance->hc_fun->ops = &hc_ops;
-	instance->hc_fun->driver_data = &instance->hc;
-	ret = ddf_fun_bind(instance->hc_fun);
-	CHECK_RET_DEST_FUN_RETURN(ret,
-	    "Failed(%d) to bind OHCI device function: %s.\n",
-	    ret, str_error(ret));
-#undef CHECK_RET_HC_RETURN
 
 #define CHECK_RET_FINI_RETURN(ret, message...) \
 if (ret != EOK) { \
-	usb_log_error(message); \
-	if (instance->hc_fun) \
-		ddf_fun_destroy(instance->hc_fun); \
-	if (instance->rh_fun) \
-		ddf_fun_destroy(instance->rh_fun); \
 	hc_fini(&instance->hc); \
-	return ret; \
+	CHECK_RET_DEST_FUN_RETURN(ret, message); \
 }
 
@@ -204,17 +204,15 @@
 	    "Failed(%d) to register interrupt handler.\n", ret);
 
-	instance->rh_fun = ddf_fun_create(device, fun_inner, "ohci-rh");
-	ret = (instance->rh_fun == NULL) ? ENOMEM : EOK;
+	ret = ddf_fun_bind(instance->hc_fun);
 	CHECK_RET_FINI_RETURN(ret,
-	    "Failed(%d) to create root hub function.\n", ret);
-
-
-	instance->rh_fun->ops = &rh_ops;
-	instance->rh_fun->driver_data = NULL;
-	
+	    "Failed(%d) to bind OHCI device function: %s.\n",
+	    ret, str_error(ret));
+
 	device->driver_data = instance;
 
 	hc_start_hw(&instance->hc);
 	return EOK;
+
+#undef CHECK_RET_DEST_FUN_RETURN
 #undef CHECK_RET_FINI_RETURN
 }
Index: uspace/drv/ohci/ohci.h
===================================================================
--- uspace/drv/ohci/ohci.h	(revision 7ab7c7f682acb2b85b576ebffa9c394b68bd0feb)
+++ uspace/drv/ohci/ohci.h	(revision 62265ce4a17948e39e68b43102deba3223a20599)
@@ -49,5 +49,5 @@
 } ohci_t;
 
-int ohci_init(ohci_t *instance, ddf_dev_t *device);
+int device_setup_ohci(ddf_dev_t *device, ohci_t *instance);
 
 #endif
