Changeset 3aa24ae8 in mainline
- Timestamp:
- 2018-11-22T17:36:48Z (6 years ago)
- Parents:
- ca21f1e2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/bus.c
rca21f1e2 r3aa24ae8 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.