mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
Merge "soc: qcom: ramdump: Fix the missed unmap of mapped memory"
This commit is contained in:
commit
0f94ddc2cf
1 changed files with 4 additions and 0 deletions
|
|
@ -262,6 +262,8 @@ static ssize_t ramdump_read(struct file *filep, char __user *buf, size_t count,
|
|||
}
|
||||
|
||||
kfree(finalbuf);
|
||||
if (!vaddr && origdevice_mem)
|
||||
iounmap(origdevice_mem);
|
||||
|
||||
*pos += copy_size;
|
||||
|
||||
|
|
@ -275,6 +277,8 @@ static ssize_t ramdump_read(struct file *filep, char __user *buf, size_t count,
|
|||
ramdump_done:
|
||||
srcu_read_unlock(&rd_dev->rd_srcu, srcu_idx);
|
||||
kfree(finalbuf);
|
||||
if (!vaddr && origdevice_mem)
|
||||
iounmap(origdevice_mem);
|
||||
*pos = 0;
|
||||
reset_ramdump_entry(entry);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue