Changes in uspace/drv/uhci-hcd/iface.c [0ede0c3:2cc6e97] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/iface.c
r0ede0c3 r2cc6e97 148 148 assert(hc); 149 149 const size_t size = max_packet_size; 150 int ret;151 150 usb_speed_t speed = usb_device_keeper_get_speed(&hc->manager, address); 152 151 if (speed >= USB_SPEED_MAX) { … … 157 156 usb_str_speed(speed), direction, size, max_packet_size, interval); 158 157 159 160 endpoint_t *ep = malloc(sizeof(endpoint_t)); 161 if (ep == NULL) 162 return ENOMEM; 163 ret = endpoint_init(ep, address, endpoint, direction, 164 transfer_type, speed, max_packet_size); 165 if (ret != EOK) { 166 free(ep); 167 return ret; 168 } 169 170 ret = usb_endpoint_manager_register_ep(&hc->ep_manager, ep, size); 171 if (ret != EOK) { 172 endpoint_destroy(ep); 173 } 174 return ret; 158 return usb_endpoint_manager_add_ep(&hc->ep_manager, address, endpoint, 159 direction, transfer_type, speed, max_packet_size, size); 175 160 } 176 161 /*----------------------------------------------------------------------------*/ … … 210 195 ret = hc_schedule(hc, batch); 211 196 if (ret != EOK) { 212 batch_dispose(batch);197 usb_transfer_batch_dispose(batch); 213 198 } 214 199 return ret; … … 238 223 ret = hc_schedule(hc, batch); 239 224 if (ret != EOK) { 240 batch_dispose(batch);225 usb_transfer_batch_dispose(batch); 241 226 } 242 227 return ret; … … 266 251 ret = hc_schedule(hc, batch); 267 252 if (ret != EOK) { 268 batch_dispose(batch);253 usb_transfer_batch_dispose(batch); 269 254 } 270 255 return ret; … … 294 279 ret = hc_schedule(hc, batch); 295 280 if (ret != EOK) { 296 batch_dispose(batch);281 usb_transfer_batch_dispose(batch); 297 282 } 298 283 return ret; … … 327 312 ret = hc_schedule(hc, batch); 328 313 if (ret != EOK) { 329 batch_dispose(batch);314 usb_transfer_batch_dispose(batch); 330 315 } 331 316 return ret; … … 359 344 ret = hc_schedule(hc, batch); 360 345 if (ret != EOK) { 361 batch_dispose(batch);346 usb_transfer_batch_dispose(batch); 362 347 } 363 348 return ret;
Note:
See TracChangeset
for help on using the changeset viewer.