Changeset a91fbb1 in mainline for uspace/drv/usbhid/mouse/mousedev.c


Ignore:
Timestamp:
2011-04-15T20:53:17Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c2cbcf
Parents:
27b85d9 (diff), 8595577b (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 development/ changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/mouse/mousedev.c

    r27b85d9 ra91fbb1  
    157157static void usb_mouse_free(usb_mouse_t **mouse_dev)
    158158{
    159         if (mouse_dev == NULL || *mouse_dev == NULL) {
    160                 return;
    161         }
     159        assert(mouse_dev != NULL && *mouse_dev != NULL);
    162160       
    163161        // hangup phone to the console
    164         async_hangup((*mouse_dev)->console_phone);
     162        if ((*mouse_dev)->console_phone >= 0) {
     163                async_hangup((*mouse_dev)->console_phone);
     164        }
    165165       
    166166        free(*mouse_dev);
Note: See TracChangeset for help on using the changeset viewer.