media: aspeed: fix an incorrect return code on buffer allocation failure
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/media/platform/aspeed-video.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/platform/aspeed-video.c +1 -0
@@ -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; }
Signature · 1 line
2.7.4
Quoted 4 lines · Jae Hyun Yoo
It returns '0' even when a failure happens on jpeg buffer allocation so this commit fixes the issue.
Signed-off-by Jae Hyun Yoo <[email protected]>
Reviewed-by Andrew Jeffery <[email protected]>
Quoted 22 lines
--- drivers/media/platform/aspeed-video.c | 1 + 1 file changed, 1 insertion(+)drivers/media/platform/aspeed-video.c +1
-0@@ -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; }Signature · 2 lines
-- 2.7.4
Quoted 9 lines · Andrew Jeffery
Quoted 4 lines · Jae Hyun Yoo
It returns '0' even when a failure happens on jpeg buffer allocation so this commit fixes the issue.
Signed-off-by Jae Hyun Yoo <[email protected]>Reviewed-by Andrew Jeffery <[email protected]>
Keep my Reviewed-by, but can you please do a v2 that adds a Fixes: tag and also Cc stable with the patch?
Cheers,
Andrew