fs/uio: do not overwrite the return value

Signed-off-by: chao an <anchao.archer@bytedance.com>
This commit is contained in:
chao an 2025-01-21 20:13:41 +08:00 committed by Xiang Xiao
parent 2c9b287b2e
commit ff50bc191c

View file

@ -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;