because the trace buffer may contain the binary data Signed-off-by: Xiang Xiao <xiaoxiang@xxxxxxxxxx> --- drivers/remoteproc/remoteproc_debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index e90135c..0808466 100644 --- a/drivers/remoteproc/remoteproc_debugfs.c +++ b/drivers/remoteproc/remoteproc_debugfs.c @@ -48,9 +48,8 @@ static ssize_t rproc_trace_read(struct file *filp, char __user *userbuf, size_t count, loff_t *ppos) { struct rproc_mem_entry *trace = filp->private_data; - int len = strnlen(trace->va, trace->len); - return simple_read_from_buffer(userbuf, count, ppos, trace->va, len); + return simple_read_from_buffer(userbuf, count, ppos, trace->va, trace->len); } static const struct file_operations trace_rproc_ops = { -- 2.7.4