提交 8a5d2ace 编写于 作者: C Christophe JAILLET 提交者: Mauro Carvalho Chehab

[media] VPU: mediatek: Fix return value in case of error

If 'dma_alloc_coherent()' returns NULL, 'vpu_alloc_ext_mem()' will
return 0 which means success.
Return -ENOMEM instead.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 c771f42f
......@@ -689,7 +689,7 @@ static int vpu_alloc_ext_mem(struct mtk_vpu *vpu, u32 fw_type)
GFP_KERNEL);
if (!vpu->extmem[fw_type].va) {
dev_err(dev, "Failed to allocate the extended program memory\n");
return PTR_ERR(vpu->extmem[fw_type].va);
return -ENOMEM;
}
/* Disable extend0. Enable extend1 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册