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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}