Changeset 3690c75 in mainline for uspace/drv/usbhid/mouse


Ignore:
Timestamp:
2011-04-15T16:13:07Z (15 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
Children:
242f0e2, e3f1987
Parents:
6b082a1b (diff), 11d2e96a (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:

Development branch fixes

File:
1 edited

Legend:

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

    r6b082a1b r3690c75  
    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.