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:
parent
4f957f8031
commit
30aa0ee700
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user