netdev/ioctl: netlock/unlock() should in pairs
fix regression by:
commit fd53db56b6
Author: chao an <anchao@xiaomi.com>
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 <anchao@xiaomi.com>
This commit is contained in:
parent
fd53db56b6
commit
66d9397320
@ -763,6 +763,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
|
||||
|
||||
if (dev == NULL)
|
||||
{
|
||||
net_unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user