Message ID | 1487189929-24196-3-git-send-email-loic.pallardy@st.com |
---|---|
State | New |
Headers | show |
Series | remoteproc: st: add virtio_rpmsg support | expand |
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 3dabb20..74ad2d0 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -622,6 +622,11 @@ static int rproc_handle_carveout(struct rproc *rproc, dev_dbg(dev, "carveout rsc: name: %s, da 0x%x, pa 0x%x, len 0x%x, flags 0x%x\n", rsc->name, rsc->da, rsc->pa, rsc->len, rsc->flags); + if (rsc->pa != FW_RSC_ADDR_ANY) { + dev_dbg(dev, "carveout already allocated by low level driver\n"); + return 0; + } + carveout = kzalloc(sizeof(*carveout), GFP_KERNEL); if (!carveout) return -ENOMEM;