diff --git a/net/socket/socket.c b/net/socket/socket.c index 635ec4dc94d77..86ec8da9298be 100644 --- a/net/socket/socket.c +++ b/net/socket/socket.c @@ -113,23 +113,8 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) */ ret = g_usrsock_sockif.si_setup(psock, protocol); - if (ret == -ENETDOWN) - { - /* -ENETDOWN means that USRSOCK daemon is not running. Attempt to - * open socket with kernel networking stack. - */ - } - else - { - psock->s_sockif = &g_usrsock_sockif; - - if (ret < 0) - { - return ret; - } - - return ret; - } + psock->s_sockif = &g_usrsock_sockif; + return ret; } #endif /* CONFIG_NET_USRSOCK */ diff --git a/net/usrsock/usrsock_dev.c b/net/usrsock/usrsock_dev.c index 9f1f21bff5473..a557e99218522 100644 --- a/net/usrsock/usrsock_dev.c +++ b/net/usrsock/usrsock_dev.c @@ -1155,7 +1155,6 @@ int usrsockdev_do_request(FAR struct usrsock_conn_s *conn, { FAR struct usrsockdev_s *dev = conn->dev; FAR struct usrsock_request_common_s *req_head = iov[0].iov_base; - int ret = OK; if (!dev) { @@ -1207,7 +1206,6 @@ int usrsockdev_do_request(FAR struct usrsock_conn_s *conn, { ninfo("usockid=%d; daemon abruptly closed /dev/usrsock.\n", conn->usockid); - ret = -ESHUTDOWN; } /* Free request line for next command. */ @@ -1216,7 +1214,7 @@ int usrsockdev_do_request(FAR struct usrsock_conn_s *conn, --dev->req.nbusy; /* net_lock held. */ - return ret; + return OK; } /****************************************************************************