diff options
Diffstat (limited to 'drivers/misc/tegra-profiler/comm.c')
-rw-r--r-- | drivers/misc/tegra-profiler/comm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/tegra-profiler/comm.c b/drivers/misc/tegra-profiler/comm.c index ed2540c21166..98f17a228305 100644 --- a/drivers/misc/tegra-profiler/comm.c +++ b/drivers/misc/tegra-profiler/comm.c @@ -290,8 +290,10 @@ static ssize_t read_sample(char __user *buffer, size_t max_length) break; case QUADD_RECORD_TYPE_MMAP: + length_extra = sizeof(u64); + if (record.mmap.filename_length > 0) { - length_extra = record.mmap.filename_length; + length_extra += record.mmap.filename_length; } else { pr_err("Error: filename is empty\n"); goto out; |