mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user