Changeset e199ab3 in mainline for uspace/lib/usbhost/src/bus.c
- Timestamp:
- 2018-11-27T16:51:11Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c483fca
- Parents:
- 9df0f64
- git-author:
- Jakub Jermar <jakub@…> (2018-11-22 17:36:48)
- git-committer:
- Jakub Jermar <jakub@…> (2018-11-27 16:51:11)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/bus.c
r9df0f64 re199ab3 370 370 int bus_endpoint_add(device_t *device, const usb_endpoint_descriptors_t *desc, endpoint_t **out_ep) 371 371 { 372 int err ;372 int err = EINVAL; 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 397 394 const size_t idx = bus_endpoint_index(ep->endpoint, ep->direction); 398 395 if (idx >= ARRAY_SIZE(device->endpoints)) { … … 425 422 } 426 423 fibril_mutex_unlock(&device->guard); 427 if (err) { 428 endpoint_del_ref(ep); 429 return err; 430 } 424 if (err) 425 goto drop; 431 426 432 427 if (out_ep) { … … 438 433 return EOK; 439 434 drop: 440 /* Bus reference */441 435 endpoint_del_ref(ep); 442 return EINVAL;436 return err; 443 437 } 444 438
Note:
See TracChangeset
for help on using the changeset viewer.