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


Ignore:
Timestamp:
2013-08-07T08:26:40Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6340a6ff
Parents:
cce3228
Message:

uhci: remove some more error handling macros

File:
1 edited

Legend:

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

    rcce3228 re0d8b740  
    149149        hcd_set_implementation(dev_to_hcd(device), hc, hc_schedule, NULL, NULL);
    150150
    151 // TODO: Undo hcd_setup_device
    152 #define CHECK_RET_FINI_RETURN(ret, message...) \
    153 if (ret != EOK) { \
    154         hc_fini(hc); \
    155         CHECK_RET_RETURN(ret, message); \
    156         return ret; \
    157 } else (void)0
    158 
     151        /*
     152         * Creating root hub registers a new USB device so all HC
     153         * functionality needs to be ready at this time.
     154         */
    159155        ret = hcd_ddf_setup_root_hub(device, USB_SPEED_FULL);
    160         CHECK_RET_FINI_RETURN(ret,
    161             "Failed to setup UHCI root hub: %s.\n", str_error(ret));
     156        if (ret != EOK) {
     157                // TODO: Undo hcd_setup_device
     158                hc_fini(hc);
     159                CHECK_RET_RETURN(ret, "Failed to setup UHCI root hub: %s.\n",
     160                    str_error(ret));
     161                return ret;
     162        }
    162163
    163164        return EOK;
    164 #undef CHECK_RET_FINI_RETURN
    165165}
    166166/**
Note: See TracChangeset for help on using the changeset viewer.