diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2016-09-23 18:19:01 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-24 18:11:57 -0200 |
commit | 8a5d2acee6fa9ec5997335cc3ebdd47c7524d6d2 (patch) | |
tree | c4d9c3844d088d6c873d211f9386bbac5c79bbc9 /drivers/media/platform/mtk-vpu | |
parent | c771f42fed7f21f510793302687884b424cd9f54 (diff) | |
download | linux-8a5d2acee6fa9ec5997335cc3ebdd47c7524d6d2.tar.bz2 |
[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: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/mtk-vpu')
-rw-r--r-- | drivers/media/platform/mtk-vpu/mtk_vpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/mtk-vpu/mtk_vpu.c b/drivers/media/platform/mtk-vpu/mtk_vpu.c index c3643d929167..463b69c934be 100644 --- a/drivers/media/platform/mtk-vpu/mtk_vpu.c +++ b/drivers/media/platform/mtk-vpu/mtk_vpu.c @@ -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 */ |