Re: [PATCH] media: aspeed: fix an incorrect return code on buffer allocation failure

Andrew Jeffery andrew at aj.id.au
Mon Aug 26 11:32:19 AEST 2019



On Sat, 24 Aug 2019, at 07:00, Jae Hyun Yoo wrote:
> 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 at linux.intel.com>

Reviewed-by: Andrew Jeffery <andrew at aj.id.au>

> ---
>  drivers/media/platform/aspeed-video.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> 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;
>  	}
>  
> -- 
> 2.7.4
> 
>


More information about the Linux-aspeed mailing list