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:
chao an 2022-09-08 13:39:36 +08:00 committed by Xiang Xiao
parent fd53db56b6
commit 66d9397320

View File

@ -763,6 +763,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
if (dev == NULL)
{
net_unlock();
return ret;
}