devif_callback: modify the code logic to conform to the comment

The previous logic will caused some tcp flow errors.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu 2023-09-13 15:38:58 +08:00 committed by Xiang Xiao
parent 1226f3ffef
commit 114b8323d6

View file

@ -296,7 +296,7 @@ FAR struct devif_callback_s *
* to de-allocate connection callbacks reliably on NETDEV_DOWN event.
*/
if (dev && !netdev_verify(dev) && (dev->d_flags & IFF_UP) != 0)
if (dev && !(netdev_verify(dev) && (dev->d_flags & IFF_UP) != 0))
{
net_unlock();
return NULL;