Changeset 1526c174 in mainline


Ignore:
Timestamp:
2011-10-14T23:34:51Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2a5b62b
Parents:
bd444e5
Message:

libusbdev: Unregister only endpoints that are present.

Not present endpoints don't need it and do not have to be fully initialized.
Fixes crash on usbhid unplug.

Location:
uspace/lib/usbdev/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/devdrv.c

    rbd444e5 r1526c174  
    469469        size_t i;
    470470        for (i = 0; i < pipes_count; i++) {
    471                 usb_pipe_unregister(pipes[i].pipe, &hc_conn);
     471                usb_log_debug2("Unregistering pipe %zu (%spresent).\n",
     472                    i, pipes[i].present ? "" : "not ");
     473                if (pipes[i].present)
     474                        usb_pipe_unregister(pipes[i].pipe, &hc_conn);
    472475                free(pipes[i].pipe);
    473476        }
  • uspace/lib/usbdev/src/pipesinit.c

    rbd444e5 r1526c174  
    514514{
    515515        assert(pipe);
     516        assert(pipe->wire);
    516517        assert(hc_connection);
    517518       
Note: See TracChangeset for help on using the changeset viewer.