diff options
author | Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> | 2019-08-23 18:29:57 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-08-26 10:46:29 -0300 |
commit | 578c5ab074981b1e74331e58df4b8ef4439df563 (patch) | |
tree | d3551d3ab232f5381b0890dc50b482f5f420efa3 /drivers/media | |
parent | 834a1cfee8340775798296eb693964c883e239a2 (diff) | |
download | linux-578c5ab074981b1e74331e58df4b8ef4439df563.tar.bz2 |
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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/aspeed-video.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c index f899ac3b4a61..94f97d96dabc 100644 --- a/drivers/media/platform/aspeed-video.c +++ b/drivers/media/platform/aspeed-video.c @@ -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; } |