Changes in uspace/drv/bus/usb/uhci/uhci.c [b500d60a:1664a26] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/uhci.c
rb500d60a r1664a26 148 148 int device_setup_uhci(ddf_dev_t *device) 149 149 { 150 assert(device); 151 uhci_t *instance = malloc(sizeof(uhci_t)); 150 if (!device) 151 return EBADMEM; 152 153 uhci_t *instance = ddf_dev_data_alloc(device, sizeof(uhci_t)); 152 154 if (instance == NULL) { 153 155 usb_log_error("Failed to allocate OHCI driver.\n"); … … 158 160 if (ret != EOK) { \ 159 161 if (instance->hc_fun) \ 160 instance->hc_fun->ops = NULL; \161 162 instance->hc_fun->driver_data = NULL; \ 162 163 ddf_fun_destroy(instance->hc_fun); \ 163 164 if (instance->rh_fun) {\ 164 instance->rh_fun->ops = NULL; \165 165 instance->rh_fun->driver_data = NULL; \ 166 166 ddf_fun_destroy(instance->rh_fun); \ 167 167 } \ 168 device->driver_data = NULL; \169 168 usb_log_error(message); \ 170 169 return ret; \ … … 227 226 "Failed to init uhci_hcd: %s.\n", str_error(ret)); 228 227 229 device->driver_data = instance;230 231 228 #define CHECK_RET_FINI_RETURN(ret, message...) \ 232 229 if (ret != EOK) { \
Note:
See TracChangeset
for help on using the changeset viewer.