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:
parent
cc09e77a94
commit
d29cb09da3
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue