mirror of
https://github.com/OpenAMP/open-amp.git
synced 2026-09-22 15:44:09 +08:00
apps: zynq7: check NULL pointer in mmap()
Check if pointer is NULL in mmap() before writing to it. Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
This commit is contained in:
@@ -130,7 +130,8 @@ zynq_a9_proc_mmap(struct remoteproc *rproc, metal_phys_addr_t *pa,
|
||||
remoteproc_add_mem(rproc, mem);
|
||||
*pa = lpa;
|
||||
*da = lda;
|
||||
*io = tmpio;
|
||||
if (io)
|
||||
*io = tmpio;
|
||||
return metal_io_phys_to_virt(tmpio, mem->pa);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user