diff --git a/net/inet/inet_sockif.c b/net/inet/inet_sockif.c index 2c07941791..6ea41d8ce3 100644 --- a/net/inet/inet_sockif.c +++ b/net/inet/inet_sockif.c @@ -407,7 +407,7 @@ static int inet_bind(FAR struct socket *psock, if (addrlen < minlen) { nerr("ERROR: Invalid address length: %d < %d\n", addrlen, minlen); - return -EBADF; + return -EINVAL; } /* Perform the binding depending on the protocol type */