mirror of
https://github.com/apache/nuttx.git
synced 2026-05-13 10:38:40 +08:00
drivers/usbdev: Move test for NULL pointer before the pointer is deferences. Noted by Juha Niskanen.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user