Ignore:
Timestamp:
2011-08-07T11:21:44Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cc574511
Parents:
15f3c3f (diff), e8067c0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/include/usb/host/usb_endpoint_manager.h

    r15f3c3f r86ffa27f  
    8282    size_t data_size)
    8383{
    84         endpoint_t *ep = malloc(sizeof(endpoint_t));
    85         if (ep == NULL)
     84        endpoint_t *ep = endpoint_get(
     85            address, endpoint, direction, type, speed, max_packet_size);
     86        if (!ep)
    8687                return ENOMEM;
    8788
    88         int ret = endpoint_init(ep, address, endpoint, direction, type, speed,
    89             max_packet_size);
    90         if (ret != EOK) {
    91                 free(ep);
    92                 return ret;
    93         }
    94 
    95         ret = usb_endpoint_manager_register_ep(instance, ep, data_size);
     89        const int ret =
     90            usb_endpoint_manager_register_ep(instance, ep, data_size);
    9691        if (ret != EOK) {
    9792                endpoint_destroy(ep);
    98                 return ret;
    9993        }
    100         return EOK;
     94        return ret;
    10195}
    10296#endif
Note: See TracChangeset for help on using the changeset viewer.