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:
parent
1226f3ffef
commit
114b8323d6
@ -296,7 +296,7 @@ FAR struct devif_callback_s *
|
|||||||
* to de-allocate connection callbacks reliably on NETDEV_DOWN event.
|
* 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();
|
net_unlock();
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user