Fixes some issues found by the PX4 team using Coverity. From Pavel Krienko

This commit is contained in:
Gregory Nutt
2015-01-19 12:57:25 -06:00
parent 54847c118f
commit a4a6917267
3 changed files with 12 additions and 7 deletions
+6 -5
View File
@@ -1205,14 +1205,15 @@ static void cdcacm_unbind(FAR struct usbdevclass_driver_s *driver,
priv->nwrq--; /* Number of write requests queued */
}
}
DEBUGASSERT(priv->nwrq == 0);
irqrestore(flags);
/* Clear out all data in the circular buffer */
priv->serdev.xmit.head = 0;
priv->serdev.xmit.tail = 0;
}
/* Clear out all data in the circular buffer */
priv->serdev.xmit.head = 0;
priv->serdev.xmit.tail = 0;
}
/****************************************************************************