rndis: Fixed rndis assert issue when calling composite_uninitlize

Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
This commit is contained in:
sunkun3 2023-08-31 21:06:21 +08:00 committed by Mateusz Szafoni
parent 89e409a194
commit 219677cdae
1 changed files with 8 additions and 4 deletions

View File

@ -2308,11 +2308,15 @@ static void usbclass_unbind(FAR struct usbdevclass_driver_s *driver,
*/
if (priv->rdreq)
{
usbdev_freereq(priv->epbulkout, priv->rdreq);
}
{
usbdev_freereq(priv->epbulkout, priv->rdreq);
}
netdev_unregister(&priv->netdev);
if (priv->registered)
{
netdev_unregister(&priv->netdev);
priv->registered = false;
}
/* Free write requests that are not in use (which should be all
* of them