From ff50bc191cf2612b1d9461e396ab95bbf5303aa0 Mon Sep 17 00:00:00 2001 From: chao an Date: Tue, 21 Jan 2025 20:13:41 +0800 Subject: [PATCH] fs/uio: do not overwrite the return value Signed-off-by: chao an --- fs/vfs/fs_uio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/vfs/fs_uio.c b/fs/vfs/fs_uio.c index 0ee178bfbfec8..c18bf1867f152 100644 --- a/fs/vfs/fs_uio.c +++ b/fs/vfs/fs_uio.c @@ -131,7 +131,7 @@ int uio_init(FAR struct uio *uio, FAR const struct iovec *iov, int iovcnt) resid = uio_calc_resid(uio); if (resid < 0) { - return -EINVAL; + return resid; } uio->uio_resid = resid;