AnsweredAssumed Answered

bug? - from khci_dev.c : usb_dci_khci_get_xd()

Question asked by Chris Charleson on Oct 10, 2014
Latest reply on Oct 15, 2014 by Chris Charleson

when there are no entries, the return path calls OS_Mutex_unlock instead of OS_Unlock() used in the success return path.

 

 

    /* This function can be called from any context, and it needs mutual

       exclusion with itself.*/

    OS_Lock();

   

    /* Get a transfer descriptor for the specified endpoint

     ** and direction

     */

    if (!usb_dev_ptr->xd_entries)

    {

        OS_Mutex_unlock(usb_dev_ptr->mutex);

        return USBERR_DEVICE_BUSY;

    }

Outcomes