mirror of
https://github.com/apache/nuttx.git
synced 2026-09-02 23:23:02 +00:00
net/can: return -ENODEV if the device is not found when bind
correction return value Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
parent
c1b2b1b4fb
commit
b7b9aebab9
1 changed files with 1 additions and 1 deletions
|
|
@ -340,7 +340,7 @@ static int can_bind(FAR struct socket *psock,
|
|||
conn->dev = netdev_findbyname((const char *)&netdev_name);
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
return conn->dev == NULL ? -ENODEV : OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue