Commit 578c5ab0 authored by Jae Hyun Yoo's avatar Jae Hyun Yoo Committed by Mauro Carvalho Chehab

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: default avatarJae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Reviewed-by: default avatarAndrew Jeffery <andrew@aj.id.au>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 834a1cfe
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment