Index: uspace/drv/bus/usb/ohci/hc.c
===================================================================
--- uspace/drv/bus/usb/ohci/hc.c	(revision 89128f37525649ee8a7c2d6155cdc0a5b27244e9)
+++ uspace/drv/bus/usb/ohci/hc.c	(revision 9c986d34e4191013f9c697e01b8a98d666500cc4)
@@ -148,4 +148,5 @@
 	return ret; \
 } else (void)0
+
 	ret = usb_endpoint_manager_add_ep(
 	    &instance->generic.ep_manager, instance->rh.address, 0,
Index: uspace/drv/bus/usb/ohci/ohci.c
===================================================================
--- uspace/drv/bus/usb/ohci/ohci.c	(revision 89128f37525649ee8a7c2d6155cdc0a5b27244e9)
+++ uspace/drv/bus/usb/ohci/ohci.c	(revision 9c986d34e4191013f9c697e01b8a98d666500cc4)
@@ -140,23 +140,23 @@
 int device_setup_ohci(ddf_dev_t *device)
 {
-	assert(device);
-
-	ohci_t *instance = malloc(sizeof(ohci_t));
+	if (device == NULL)
+		return EBADMEM;
+
+	ohci_t *instance = ddf_dev_data_alloc(device,sizeof(ohci_t));
 	if (instance == NULL) {
 		usb_log_error("Failed to allocate OHCI driver.\n");
 		return ENOMEM;
 	}
-	instance->rh_fun = NULL;
-	instance->hc_fun = NULL;
 
 #define CHECK_RET_DEST_FREE_RETURN(ret, message...) \
 if (ret != EOK) { \
 	if (instance->hc_fun) { \
+		instance->hc_fun->driver_data = NULL; \
 		ddf_fun_destroy(instance->hc_fun); \
 	} \
 	if (instance->rh_fun) { \
+		instance->rh_fun->driver_data = NULL; \
 		ddf_fun_destroy(instance->rh_fun); \
 	} \
-	free(instance); \
 	usb_log_error(message); \
 	return ret; \
@@ -219,6 +219,4 @@
 	    "Failed to init ohci_hcd: %s.\n", str_error(ret));
 
-	device->driver_data = instance;
-
 #define CHECK_RET_FINI_RETURN(ret, message...) \
 if (ret != EOK) { \
