Changes in uspace/lib/usbhost/src/bus.c [e199ab3:64532a97] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/bus.c
re199ab3 r64532a97 370 370 int bus_endpoint_add(device_t *device, const usb_endpoint_descriptors_t *desc, endpoint_t **out_ep) 371 371 { 372 int err = EINVAL;372 int err; 373 373 assert(device); 374 374 … … 392 392 assert((ep->required_transfer_buffer_policy & ~ep->transfer_buffer_policy) == 0); 393 393 394 /* Bus reference */ 395 endpoint_add_ref(ep); 396 394 397 const size_t idx = bus_endpoint_index(ep->endpoint, ep->direction); 395 398 if (idx >= ARRAY_SIZE(device->endpoints)) { … … 422 425 } 423 426 fibril_mutex_unlock(&device->guard); 424 if (err) 425 goto drop; 427 if (err) { 428 endpoint_del_ref(ep); 429 return err; 430 } 426 431 427 432 if (out_ep) { … … 433 438 return EOK; 434 439 drop: 440 /* Bus reference */ 435 441 endpoint_del_ref(ep); 436 return err;442 return EINVAL; 437 443 } 438 444
Note:
See TracChangeset
for help on using the changeset viewer.