Remove some duplicate logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1054 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
430198df4c
commit
0c8c5d247d
@ -1446,13 +1446,7 @@ static void usbclass_unbind(FAR struct usbdev_s *dev)
|
||||
usbclass_resetconfig(priv);
|
||||
up_mdelay(50);
|
||||
|
||||
if (priv->ctrlreq != NULL)
|
||||
{
|
||||
usbclass_freereq(dev->ep0, priv->ctrlreq);
|
||||
}
|
||||
dev->ep0->private = priv;
|
||||
|
||||
/* Free int interrupt IN endpoint */
|
||||
/* Free the interrupt IN endpoint */
|
||||
|
||||
if (priv->epintin)
|
||||
{
|
||||
@ -1460,6 +1454,8 @@ static void usbclass_unbind(FAR struct usbdev_s *dev)
|
||||
priv->epintin = NULL;
|
||||
}
|
||||
|
||||
/* Free the bulk IN endpoint */
|
||||
|
||||
if (priv->epbulkin)
|
||||
{
|
||||
DEV_FREEEP(dev, priv->epbulkin);
|
||||
@ -1471,6 +1467,7 @@ static void usbclass_unbind(FAR struct usbdev_s *dev)
|
||||
if (priv->ctrlreq != NULL)
|
||||
{
|
||||
usbclass_freereq(dev->ep0, priv->ctrlreq);
|
||||
priv->ctrlreg = NULL;
|
||||
}
|
||||
|
||||
/* Free pre-allocated read requests (which should all have
|
||||
|
Loading…
Reference in New Issue
Block a user