mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
drivers/usbdev/cdcacm.c: fix check priv->nwrq issue
When enable CONFIG_CDCACM_DISABLE_TXBUF, dev->xmit.buffer always take one req, so just compare CONFIG_CDCACM_NWRREQS - 1. Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
This commit is contained in:
parent
e78e152cc7
commit
fe293ec9b5
1 changed files with 5 additions and 0 deletions
|
|
@ -1485,7 +1485,12 @@ static void cdcacm_unbind(FAR struct usbdevclass_driver_s *driver,
|
|||
*/
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
#ifdef CONFIG_CDCACM_DISABLE_TXBUF
|
||||
DEBUGASSERT(priv->nwrq >= CONFIG_CDCACM_NWRREQS - 1);
|
||||
#else
|
||||
DEBUGASSERT(priv->nwrq == CONFIG_CDCACM_NWRREQS);
|
||||
#endif
|
||||
|
||||
while (!sq_empty(&priv->txfree))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue