Changeset 409dce5 in mainline


Ignore:
Timestamp:
2011-01-09T08:55:47Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
276aeda
Parents:
38c5dfa
Message:

Minor fixes in GET_DESCRIPTOR

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/usbdrvreq.c

    r38c5dfa r409dce5  
    8080 * @param[in] descriptor_type Descriptor type (device/configuration/HID/...).
    8181 * @param[in] descriptor_index Descriptor index.
    82  * @param[in] langauge Language index.
     82 * @param[in] language Language index.
    8383 * @param[out] buffer Buffer where to store the retrieved descriptor.
    8484 * @param[in] size Size of the @p buffer.
     
    9292    void *buffer, size_t size, size_t *actual_size)
    9393{
     94        if (buffer == NULL) {
     95                return EBADMEM;
     96        }
     97        if (size == 0) {
     98                return EINVAL;
     99        }
     100
    94101        /* Prepare the target. */
    95102        usb_target_t target = {
     
    221228    void *buffer, size_t buffer_size, size_t *actual_buffer_size)
    222229{
    223         if (buffer == NULL) {
    224                 return EBADMEM;
    225         }
    226 
    227230        int rc = usb_drv_req_get_descriptor(phone, address,
    228231            USB_REQUEST_TYPE_STANDARD,
Note: See TracChangeset for help on using the changeset viewer.