diff --git a/libs/libc/uio/lib_writev.c b/libs/libc/uio/lib_writev.c index f35561bda7..02b9fc0326 100644 --- a/libs/libc/uio/lib_writev.c +++ b/libs/libc/uio/lib_writev.c @@ -123,7 +123,7 @@ ssize_t writev(int fildes, FAR const struct iovec *iov, int iovcnt) set_errno(save); } - return ERROR; + return ntotal ? ntotal : ERROR; } /* Update pointers and counts in order to handle partial