]> git.baikalelectronics.ru Git - kernel.git/commit
remoteproc: fix rproc_da_to_va in case of unallocated carveout
authorLoic Pallardy <loic.pallardy@st.com>
Thu, 10 Jan 2019 13:49:06 +0000 (14:49 +0100)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 21 Feb 2019 05:34:18 +0000 (21:34 -0800)
commit12c7cf18c1637d305cdb109d5f4dfe7ae80084a1
tree9b3d4485f0c0b7d27c4cc2b91ffa89608791048d
parent1c81893114e854ed497421a16f4623455d3c6300
remoteproc: fix rproc_da_to_va in case of unallocated carveout

With introduction of rproc_alloc_registered_carveouts() which
delays carveout allocation just before the start of the remote
processor, rproc_da_to_va() could be called before all carveouts
are allocated.
This patch adds a check in rproc_da_to_va() to return NULL if
carveout is not allocated.

Fixes: 284a4eeae6b5 ("remoteproc: add alloc ops in rproc_mem_entry struct")
Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_core.c