diff mbox

[v2] venus: fix copy/paste error in return_buf_error

Message ID 20170818160719.GA4899@embeddedgus (mailing list archive)
State New, archived
Headers show

Commit Message

Gustavo A. R. Silva Aug. 18, 2017, 4:07 p.m. UTC
Call function v4l2_m2m_dst_buf_remove_by_buf() instead of
v4l2_m2m_src_buf_remove_by_buf()

Addresses-Coverity-ID: 1415317
Cc: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
Changes in v2:
 Stanimir Varbanov confirmed this is a bug. The correct fix is to call
 function v4l2_m2m_dst_buf_remove_by_buf instead of function
 v4l2_m2m_src_buf_remove_by_buf in the _else_ branch.

 drivers/media/platform/qcom/venus/helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stanimir Varbanov Aug. 21, 2017, 9:14 a.m. UTC | #1
Thanks Gustavo!

On 08/18/2017 07:07 PM, Gustavo A. R. Silva wrote:
> Call function v4l2_m2m_dst_buf_remove_by_buf() instead of
> v4l2_m2m_src_buf_remove_by_buf()
> 
> Addresses-Coverity-ID: 1415317
> Cc: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> Cc: Hans Verkuil <hverkuil@xs4all.nl>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> Changes in v2:
>  Stanimir Varbanov confirmed this is a bug. The correct fix is to call
>  function v4l2_m2m_dst_buf_remove_by_buf instead of function
>  v4l2_m2m_src_buf_remove_by_buf in the _else_ branch.
> 
>  drivers/media/platform/qcom/venus/helpers.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>

> 
> diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
> index 5f4434c..2d61879 100644
> --- a/drivers/media/platform/qcom/venus/helpers.c
> +++ b/drivers/media/platform/qcom/venus/helpers.c
> @@ -243,7 +243,7 @@ static void return_buf_error(struct venus_inst *inst,
>  	if (vbuf->vb2_buf.type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
>  		v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf);
>  	else
> -		v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf);
> +		v4l2_m2m_dst_buf_remove_by_buf(m2m_ctx, vbuf);
>  
>  	v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR);
>  }
>
Gustavo A. R. Silva Aug. 22, 2017, 7:22 p.m. UTC | #2
On 08/21/2017 04:14 AM, Stanimir Varbanov wrote:
> Thanks Gustavo!
>

Glad to help. :)

> On 08/18/2017 07:07 PM, Gustavo A. R. Silva wrote:
>> Call function v4l2_m2m_dst_buf_remove_by_buf() instead of
>> v4l2_m2m_src_buf_remove_by_buf()
>>
>> Addresses-Coverity-ID: 1415317
>> Cc: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>> Cc: Hans Verkuil <hverkuil@xs4all.nl>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> ---
>> Changes in v2:
>>  Stanimir Varbanov confirmed this is a bug. The correct fix is to call
>>  function v4l2_m2m_dst_buf_remove_by_buf instead of function
>>  v4l2_m2m_src_buf_remove_by_buf in the _else_ branch.
>>
>>  drivers/media/platform/qcom/venus/helpers.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>
>>
>> diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
>> index 5f4434c..2d61879 100644
>> --- a/drivers/media/platform/qcom/venus/helpers.c
>> +++ b/drivers/media/platform/qcom/venus/helpers.c
>> @@ -243,7 +243,7 @@ static void return_buf_error(struct venus_inst *inst,
>>  	if (vbuf->vb2_buf.type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
>>  		v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf);
>>  	else
>> -		v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf);
>> +		v4l2_m2m_dst_buf_remove_by_buf(m2m_ctx, vbuf);
>>
>>  	v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR);
>>  }
>>
>
Stanimir Varbanov Aug. 23, 2017, 12:59 p.m. UTC | #3
Gustavo,

could you resend the patch with the Acked-by and Cc stable kernel.

On 08/18/2017 07:07 PM, Gustavo A. R. Silva wrote:
> Call function v4l2_m2m_dst_buf_remove_by_buf() instead of
> v4l2_m2m_src_buf_remove_by_buf()
> 
> Addresses-Coverity-ID: 1415317
> Cc: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> Cc: Hans Verkuil <hverkuil@xs4all.nl>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> Changes in v2:
>  Stanimir Varbanov confirmed this is a bug. The correct fix is to call
>  function v4l2_m2m_dst_buf_remove_by_buf instead of function
>  v4l2_m2m_src_buf_remove_by_buf in the _else_ branch.
> 
>  drivers/media/platform/qcom/venus/helpers.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
> index 5f4434c..2d61879 100644
> --- a/drivers/media/platform/qcom/venus/helpers.c
> +++ b/drivers/media/platform/qcom/venus/helpers.c
> @@ -243,7 +243,7 @@ static void return_buf_error(struct venus_inst *inst,
>  	if (vbuf->vb2_buf.type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
>  		v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf);
>  	else
> -		v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf);
> +		v4l2_m2m_dst_buf_remove_by_buf(m2m_ctx, vbuf);
>  
>  	v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR);
>  }
>
Stanimir Varbanov Aug. 23, 2017, 3:14 p.m. UTC | #4
On 08/23/2017 03:59 PM, Stanimir Varbanov wrote:
> Gustavo,
> 
> could you resend the patch with the Acked-by and Cc stable kernel.

No need to resend, sorry for the noise.
diff mbox

Patch

diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index 5f4434c..2d61879 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -243,7 +243,7 @@  static void return_buf_error(struct venus_inst *inst,
 	if (vbuf->vb2_buf.type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
 		v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf);
 	else
-		v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf);
+		v4l2_m2m_dst_buf_remove_by_buf(m2m_ctx, vbuf);
 
 	v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR);
 }