procfs/cpuinfo: Zero copylen in cpuinfo_read

to avoid return the negative number

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2023-12-11 10:36:03 +01:00
committed by Petro Karashchenko
parent 449197c188
commit 19baa56fb5
+4
View File
@@ -157,6 +157,10 @@ static ssize_t cpuinfo_read(FAR struct file *filep, FAR char *buffer,
{
filep->f_pos += copylen;
}
else
{
copylen = 0;
}
return copylen;
}