Changeset 332f860 in mainline


Ignore:
Timestamp:
2011-03-04T13:29:46Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
04c722f9, 140c033
Parents:
d49728c
Message:

a bit of codelifting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhub/usbhub.c

    rd49728c r332f860  
    234234        usb_endpoint_pipe_start_session(&result->endpoints.control);
    235235        opResult = usb_request_get_descriptor(&result->endpoints.control,
    236                         USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_DEVICE,
     236                        USB_REQUEST_TYPE_STANDARD, USB_REQUEST_RECIPIENT_DEVICE,
    237237                        USB_DESCTYPE_HUB,
    238238                        0, 0, serialized_descriptor,
     
    243243                dprintf(USB_LOG_LEVEL_ERROR, "failed when receiving hub descriptor, badcode = %d",opResult);
    244244                free(serialized_descriptor);
    245                 return result;
     245                free(result);
     246                return NULL;
    246247        }
    247248        dprintf(USB_LOG_LEVEL_DEBUG2, "deserializing descriptor");
     
    249250        if(descriptor==NULL){
    250251                dprintf(USB_LOG_LEVEL_WARNING, "could not deserialize descriptor ");
    251                 result->port_count = 1;///\TODO this code is only for debug!!!
    252                 return result;
     252                free(result);
     253                return NULL;
    253254        }
    254255
     
    286287
    287288        usb_hub_info_t * hub_info = usb_create_hub_info(dev);
     289        if(!hub_info){
     290                return EINTR;
     291        }
    288292
    289293        int opResult;
     
    294298        opResult = usb_hub_process_configuration_descriptors(hub_info);
    295299        if(opResult != EOK){
    296                 dprintf(USB_LOG_LEVEL_ERROR,"could not get condiguration descriptors, %d",
     300                dprintf(USB_LOG_LEVEL_ERROR,"could not get configuration descriptors, %d",
    297301                                opResult);
    298302                return opResult;
Note: See TracChangeset for help on using the changeset viewer.