drivers: wifi: simplelink: socket() should return non-zero fds
simplelink_socket() is not returning non-zero socket file descriptors when it succeeds. This leads to socket() to always return socket fd 0, even when the network processor returns a non-zero fd. This commit fixes simplelink_socket() to return the correct socket fd when it succeeds in getting one from the network processor. Fixes #12650 Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit is contained in:
parent
d0afacc6b4
commit
f1619beab9
1 changed files with 3 additions and 0 deletions
|
@ -68,9 +68,12 @@ static int simplelink_socket(int family, int type, int proto)
|
|||
if (retval < 0) {
|
||||
retval = EPROTONOSUPPORT;
|
||||
(void)sl_Close(sd);
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
retval = sd;
|
||||
|
||||
exit:
|
||||
return _SlDrvSetErrno(retval);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue