Hello,

On Monday, March 21, 2011 12:31 AM Pawel Osciak wrote:

> Fix vb2 not handling return value from start_streaming() callback.
> 
> Signed-off-by: Pawel Osciak <pa...@osciak.com>

Acked-by: Marek Szyprowski <m.szyprow...@samsung.com>

> ---
>  drivers/media/video/videobuf2-core.c |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/video/videobuf2-core.c 
> b/drivers/media/video/videobuf2-core.c
> index 8c6f04b..6698c77 100644
> --- a/drivers/media/video/videobuf2-core.c
> +++ b/drivers/media/video/videobuf2-core.c
> @@ -1111,6 +1111,7 @@ EXPORT_SYMBOL_GPL(vb2_dqbuf);
>  int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type)
>  {
>       struct vb2_buffer *vb;
> +     int ret;
> 
>       if (q->fileio) {
>               dprintk(1, "streamon: file io in progress\n");
> @@ -1138,12 +1139,16 @@ int vb2_streamon(struct vb2_queue *q, enum 
> v4l2_buf_type type)
>               }
>       }
> 
> -     q->streaming = 1;
> -
>       /*
>        * Let driver notice that streaming state has been enabled.
>        */
> -     call_qop(q, start_streaming, q);
> +     ret = call_qop(q, start_streaming, q);
> +     if (ret) {
> +             dprintk(1, "streamon: driver refused to start streaming\n");
> +             return ret;
> +     }
> +
> +     q->streaming = 1;
> 
>       /*
>        * If any buffers were queued before streamon,
> --
> 1.7.4.1

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to