From 66d9397320db7732993ffd4f972d563769c481ca Mon Sep 17 00:00:00 2001 From: chao an Date: Thu, 8 Sep 2022 13:39:36 +0800 Subject: [PATCH] netdev/ioctl: netlock/unlock() should in pairs fix regression by: commit fd53db56b6a49311a807fbc8944fcb7b11f33b6f Author: chao an Date: Wed Sep 7 10:56:09 2022 +0800 net/netdev: simplify handling of netdev ifr ioctl() 1. call netdev_ifr_dev() only once 2. unify the error code of ENODEV Signed-off-by: chao an --- net/netdev/netdev_ioctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/netdev/netdev_ioctl.c b/net/netdev/netdev_ioctl.c index b561c8f920..ed9ecf6645 100644 --- a/net/netdev/netdev_ioctl.c +++ b/net/netdev/netdev_ioctl.c @@ -763,6 +763,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, if (dev == NULL) { + net_unlock(); return ret; }