video: rockchip: mpp: issue when rcb size is invalid

when rcb size is 0, return error directly.

Change-Id: I232e210cc88d0ee382970e6c5548eee5c9b975c4
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
This commit is contained in:
Ding Wei
2021-02-02 11:06:00 +08:00
committed by Tao Huang
parent 25b712aa8f
commit 32e2880ed5

View File

@@ -859,6 +859,10 @@ static int rkvdec_alloc_rcbbuf(struct platform_device *pdev, struct rkvdec_dev *
}
iova = PAGE_ALIGN(vals[0]);
rcb_size = PAGE_ALIGN(vals[1]);
if (!rcb_size) {
dev_err(dev, "rcb_size invalid.\n");
return -EINVAL;
}
/* alloc reserve iova for rcb */
ret = iommu_dma_reserve_iova(dev, iova, rcb_size);
if (ret) {