net/devif: fix poll issue when ifdown

When the interface is in a down state, it triggers a poll busy loop issue.

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
This commit is contained in:
gaohedong
2025-06-19 21:31:33 +08:00
committed by Xiang Xiao
parent e1e6d8821e
commit 8638e9ce43
+1 -1
View File
@@ -282,7 +282,7 @@ devif_callback_alloc(FAR struct net_driver_s *dev,
* 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))
{
return NULL;
}