diff options
Diffstat (limited to 'drivers/remoteproc/remoteproc.c')
-rw-r--r-- | drivers/remoteproc/remoteproc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/remoteproc/remoteproc.c b/drivers/remoteproc/remoteproc.c index 2e9a6e0..96b855c 100644 --- a/drivers/remoteproc/remoteproc.c +++ b/drivers/remoteproc/remoteproc.c @@ -374,13 +374,9 @@ static int rproc_check_poolmem(struct rproc *rproc, u32 size, phys_addr_t pa) pr_warn("invalid pool\n"); return -EINVAL; } - if (pool->st_size < size) { - pr_warn("section size bigger than carveout memory\n"); - return -ENOSPC; - } - if ((pa < pool->st_base) || - ((pa + size) > (pool->st_base + pool->st_size))) { - pr_warn("section lies outside the remoteproc carveout\n"); + + if (pa < pool->st_base || pa + size > pool->st_base + pool->st_size) { + pr_warn("section size does not fit within carveout memory\n"); return -ENOSPC; } |