Changeset b02308e in mainline for uspace/drv/bus/usb/ohci/hc.c
- Timestamp:
- 2011-08-25T10:40:37Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 27873be
- Parents:
- 32e093e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.c
r32e093e rb02308e 238 238 return ENOMEM; 239 239 240 hcd_endpoint_t *hcd_ep= hcd_endpoint_assign(ep);241 if ( hcd_ep == NULL) {240 int ret = hcd_endpoint_assign(ep); 241 if (ret != EOK) { 242 242 endpoint_destroy(ep); 243 return ENOMEM; 244 } 245 246 int ret = 247 usb_endpoint_manager_register_ep(&instance->ep_manager, ep, size); 243 return ret; 244 } 245 246 ret = usb_endpoint_manager_register_ep(&instance->ep_manager, ep, size); 248 247 if (ret != EOK) { 249 hcd_endpoint_clear(ep);250 248 endpoint_destroy(ep); 251 249 return ret; … … 257 255 instance->registers->control &= ~C_CLE; 258 256 endpoint_list_add_ep( 259 &instance->lists[ep->transfer_type], hcd_e p);257 &instance->lists[ep->transfer_type], hcd_endpoint_get(ep)); 260 258 instance->registers->control_current = 0; 261 259 instance->registers->control |= C_CLE; … … 264 262 instance->registers->control &= ~C_BLE; 265 263 endpoint_list_add_ep( 266 &instance->lists[ep->transfer_type], hcd_e p);264 &instance->lists[ep->transfer_type], hcd_endpoint_get(ep)); 267 265 instance->registers->control |= C_BLE; 268 266 break; … … 271 269 instance->registers->control &= (~C_PLE & ~C_IE); 272 270 endpoint_list_add_ep( 273 &instance->lists[ep->transfer_type], hcd_e p);271 &instance->lists[ep->transfer_type], hcd_endpoint_get(ep)); 274 272 instance->registers->control |= C_PLE | C_IE; 275 273 break; … … 327 325 break; 328 326 } 329 hcd_endpoint_clear(ep);330 327 } else { 331 328 usb_log_warning("Endpoint without hcd equivalent structure.\n");
Note:
See TracChangeset
for help on using the changeset viewer.