Changeset b7068da in mainline for uspace/drv/bus/usb/uhci/uhci.c


Ignore:
Timestamp:
2012-02-09T20:35:12Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
591762c6
Parents:
7cede12c (diff), 3d4750f (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/drv/bus/usb/uhci/uhci.c

    r7cede12c rb7068da  
    148148int device_setup_uhci(ddf_dev_t *device)
    149149{
    150         assert(device);
    151         uhci_t *instance = malloc(sizeof(uhci_t));
     150        if (!device)
     151                return EBADMEM;
     152
     153        uhci_t *instance = ddf_dev_data_alloc(device, sizeof(uhci_t));
    152154        if (instance == NULL) {
    153155                usb_log_error("Failed to allocate OHCI driver.\n");
     
    158160if (ret != EOK) { \
    159161        if (instance->hc_fun) \
    160                 instance->hc_fun->ops = NULL; \
    161162                instance->hc_fun->driver_data = NULL; \
    162163                ddf_fun_destroy(instance->hc_fun); \
    163164        if (instance->rh_fun) {\
    164                 instance->rh_fun->ops = NULL; \
    165165                instance->rh_fun->driver_data = NULL; \
    166166                ddf_fun_destroy(instance->rh_fun); \
    167167        } \
    168         device->driver_data = NULL; \
    169168        usb_log_error(message); \
    170169        return ret; \
     
    227226            "Failed to init uhci_hcd: %s.\n", str_error(ret));
    228227
    229         device->driver_data = instance;
    230 
    231228#define CHECK_RET_FINI_RETURN(ret, message...) \
    232229if (ret != EOK) { \
Note: See TracChangeset for help on using the changeset viewer.