mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
media: common: videobuf2: fix heap alloc result check
Change-Id: I85529c10e819fcdc026923bcfb3e6664cc12f6d2 Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
@@ -113,7 +113,7 @@ static int vb2_cma_sg_alloc_contiguous(struct vb2_cma_sg_buf *buf)
|
||||
page = cma_alloc(dev_get_cma_area(buf->dev), buf->num_pages,
|
||||
get_order(buf->size), GFP_KERNEL);
|
||||
}
|
||||
if (!page) {
|
||||
if (IS_ERR_OR_NULL(page)) {
|
||||
pr_err("%s: cma_en:%d alloc pages fail\n", __func__, cma_en);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user