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