mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
Fix infinite loop in CDC/ACM driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4655 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+10
-8
@@ -2182,14 +2182,16 @@ void cdcacm_uninitialize(FAR void *handle)
|
||||
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_UARTUNREGISTER), (uint16_t)-ret);
|
||||
}
|
||||
|
||||
/* Unbind the class (if still bound) */
|
||||
|
||||
if (priv->usbdev)
|
||||
{
|
||||
cdcacm_unbind(&drvr->drvr, priv->usbdev);
|
||||
}
|
||||
|
||||
/* Unregister the driver (unless we are a part of a composite device) */
|
||||
/* Unregister the driver (unless we are a part of a composite device). The
|
||||
* device unregister logic will (1) return all of the requests to us then
|
||||
* (2) all the unbind method.
|
||||
*
|
||||
* The same thing will happen in the composite case except that: (1) the
|
||||
* composite driver will call usbdev_unregister() which will (2) return the
|
||||
* requests for all members of the composite, and (3) call the unbind
|
||||
* method in the composite device which will (4) call the unbind method
|
||||
* for this device.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_CDCACM_COMPOSITE
|
||||
usbdev_unregister(&drvr->drvr);
|
||||
|
||||
Reference in New Issue
Block a user