usbdev/cdcacm: Fix read queue counter in shutdown

nrdq is already set 0 in resetconfig.

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
This commit is contained in:
Jouni Ukkonen 2024-10-07 08:41:09 +03:00 committed by Xiang Xiao
parent 58044e3026
commit b4de080b1f
1 changed files with 4 additions and 1 deletions

View File

@ -990,7 +990,10 @@ static void cdcacm_rdcomplete(FAR struct usbdev_ep_s *ep,
case -ESHUTDOWN: /* Disconnection */
{
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_RDSHUTDOWN), 0);
priv->nrdq--;
if (priv->nrdq != 0)
{
priv->nrdq--;
}
}
break;