linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [media] v4l: vsp1: fix error return code in vsp1_video_init()
@ 2013-09-11 14:10 Wei Yongjun
  2013-09-16 16:18 ` Laurent Pinchart
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-09-11 14:10 UTC (permalink / raw)
  To: m.chehab, laurent.pinchart+renesas, sakari.ailus; +Cc: yongjun_wei, linux-media

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/media/platform/vsp1/vsp1_video.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
index 714c53e..4b0ac07 100644
--- a/drivers/media/platform/vsp1/vsp1_video.c
+++ b/drivers/media/platform/vsp1/vsp1_video.c
@@ -1026,8 +1026,10 @@ int vsp1_video_init(struct vsp1_video *video, struct vsp1_entity *rwpf)
 
 	/* ... and the buffers queue... */
 	video->alloc_ctx = vb2_dma_contig_init_ctx(video->vsp1->dev);
-	if (IS_ERR(video->alloc_ctx))
+	if (IS_ERR(video->alloc_ctx)) {
+		ret = PTR_ERR(video->alloc_ctx);
 		goto error;
+	}
 
 	video->queue.type = video->type;
 	video->queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [media] v4l: vsp1: fix error return code in vsp1_video_init()
  2013-09-11 14:10 [PATCH] [media] v4l: vsp1: fix error return code in vsp1_video_init() Wei Yongjun
@ 2013-09-16 16:18 ` Laurent Pinchart
  0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2013-09-16 16:18 UTC (permalink / raw)
  To: Wei Yongjun, sakari.ailus; +Cc: m.chehab, yongjun_wei, linux-media

Hi Wei,

Thank you for your patch.

On Wednesday 11 September 2013 22:10:24 Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I've taken the patch in my tree and will push it to v3.12.

> ---
>  drivers/media/platform/vsp1/vsp1_video.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/vsp1/vsp1_video.c
> b/drivers/media/platform/vsp1/vsp1_video.c index 714c53e..4b0ac07 100644
> --- a/drivers/media/platform/vsp1/vsp1_video.c
> +++ b/drivers/media/platform/vsp1/vsp1_video.c
> @@ -1026,8 +1026,10 @@ int vsp1_video_init(struct vsp1_video *video, struct
> vsp1_entity *rwpf)
> 
>  	/* ... and the buffers queue... */
>  	video->alloc_ctx = vb2_dma_contig_init_ctx(video->vsp1->dev);
> -	if (IS_ERR(video->alloc_ctx))
> +	if (IS_ERR(video->alloc_ctx)) {
> +		ret = PTR_ERR(video->alloc_ctx);
>  		goto error;
> +	}
> 
>  	video->queue.type = video->type;
>  	video->queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-16 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-11 14:10 [PATCH] [media] v4l: vsp1: fix error return code in vsp1_video_init() Wei Yongjun
2013-09-16 16:18 ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).