net/devif: correct the judgment condition in devif_send()
Regression by:
| commit
| Author: chao an
| Date:   Mon Jan 30 21:36:39 2023 +0800
|
|     net/devif: check the net device before use
|
|
@@ -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;
