1
0
Fork 0

media: aspeed: fix an incorrect return code on buffer allocation failure

It returns '0' even when a failure happens on jpeg buffer allocation
so this commit fixes the issue.

Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
alistair/sunxi64-5.4-dsi
Jae Hyun Yoo 2019-08-23 18:29:57 -03:00 committed by Mauro Carvalho Chehab
parent 834a1cfee8
commit 578c5ab074
1 changed files with 1 additions and 0 deletions

View File

@ -1624,6 +1624,7 @@ static int aspeed_video_init(struct aspeed_video *video)
if (!aspeed_video_alloc_buf(video, &video->jpeg,
VE_JPEG_HEADER_SIZE)) {
dev_err(dev, "Failed to allocate DMA for JPEG header\n");
rc = -ENOMEM;
goto err_release_reserved_mem;
}