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:
parent
449197c188
commit
19baa56fb5
|
@ -157,6 +157,10 @@ static ssize_t cpuinfo_read(FAR struct file *filep, FAR char *buffer,
|
||||||
{
|
{
|
||||||
filep->f_pos += copylen;
|
filep->f_pos += copylen;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
copylen = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return copylen;
|
return copylen;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue