1
0
Fork 0
forked from nuttx/nuttx-update

drivers/usbdev: Move test for NULL pointer before the pointer is deferences. Noted by Juha Niskanen.

This commit is contained in:
Gregory Nutt 2017-10-18 11:06:14 -06:00
parent cc09e77a94
commit d29cb09da3

View file

@ -480,10 +480,11 @@ static int cdcacm_recvpacket(FAR struct cdcacm_dev_s *priv,
uint16_t nexthead;
uint16_t nbytes = 0;
DEBUGASSERT(priv != NULL && rdcontainer != NULL);
uinfo("head=%d tail=%d nrdq=%d reqlen=%d\n",
priv->serdev.recv.head, priv->serdev.recv.tail, priv->nrdq, reqlen);
DEBUGASSERT(priv != NULL && rdcontainer != NULL);
#ifdef CONFIG_CDCACM_IFLOWCONTROL
DEBUGASSERT(priv->rxenabled && !priv->iactive);
#else