mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 02:36:11 +08:00
net/devif: correct the judgment condition in devif_send()
Regression by:
| commit 7fce145b30
| Author: chao an <anchao@xiaomi.com>
| Date: Mon Jan 30 21:36:39 2023 +0800
|
| net/devif: check the net device before use
|
| Signed-off-by: chao an <anchao@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -93,7 +93,7 @@ void devif_send(FAR struct net_driver_s *dev, FAR const void *buf,
|
||||
|
||||
/* Append the send buffer after device buffer */
|
||||
|
||||
if (len > iob_navail(false) * CONFIG_IOB_BUFSIZE &&
|
||||
if (len > iob_navail(false) * CONFIG_IOB_BUFSIZE ||
|
||||
netdev_iob_prepare(dev, false, 0) != OK)
|
||||
{
|
||||
ret = -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user