Changeset 56f8a04 in mainline


Ignore:
Timestamp:
2011-04-12T16:11:58Z (14 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
caed7843
Parents:
e7df6cd
Message:

Some asserts and checks (code even more defensive :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/main.c

    re7df6cd r56f8a04  
    7474static int usb_hid_try_add_device(usb_device_t *dev)
    7575{
     76        assert(dev != NULL);
     77       
    7678        /*
    7779         * Initialize device (get and process descriptors, get address, etc.)
     
    177179        usb_log_debug("usb_hid_add_device()\n");
    178180       
     181        if (dev != NULL) {
     182                usb_log_warning("Wrong parameter given for add_device().\n");
     183                return EINVAL;
     184        }
     185       
    179186        if (dev->interface_no < 0) {
    180187                usb_log_warning("Device is not a supported HID device.\n");
Note: See TracChangeset for help on using the changeset viewer.