Changeset 7977fa1 in mainline for uspace/drv/uhci/uhci.c


Ignore:
Timestamp:
2011-01-25T19:16:03Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
89a0485a
Parents:
d5f7a8ab
Message:

Add append function, check return value of TD init

File:
1 edited

Legend:

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

    rd5f7a8ab r7977fa1  
    1010
    1111static int init_tranfer_lists(transfer_list_t list[]);
     12
     13//static int init_transfer();
    1214
    1315int uhci_init(device_t *device, void *regs)
     
    8082            usb_str_transfer_type(transfer_type),
    8183            size);
     84
    8285        if (size >= 1024)
    8386                return ENOTSUP;
     
    104107        CHECK_RET_FREE_JOB(ret, "Failed to allocate tranfer descriptor.\n");
    105108
    106         transfer_descriptor_init(td, 3, size, false, target, USB_PID_IN);
     109        ret = transfer_descriptor_init(td, 3, size, false, target, USB_PID_IN);
     110        if (ret != EOK) {
     111                uhci_print_error("Failed to initialize transfer descriptor.\n");
     112                trans_free(td);
     113                trans_free(job);
     114                return ret;
     115        }
     116        td->callback = job;
    107117
    108118
Note: See TracChangeset for help on using the changeset viewer.