All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] media: venus: introduce core selection
@ 2020-03-11  8:15 Dan Carpenter
  2020-03-11  8:57 ` Stanimir Varbanov
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2020-03-11  8:15 UTC (permalink / raw)
  To: amasule; +Cc: linux-media

Hello Aniket Masule,

The patch 4ebf969375bc: "media: venus: introduce core selection" from
Dec 2, 2019, leads to the following static checker warning:

	drivers/media/platform/qcom/venus/vdec.c:968 vdec_start_streaming()
	warn: inconsistent returns 'inst->lock'.

drivers/media/platform/qcom/venus/vdec.c
   943  static int vdec_start_streaming(struct vb2_queue *q, unsigned int count)
   944  {
   945          struct venus_inst *inst = vb2_get_drv_priv(q);
   946          int ret;
   947  
   948          mutex_lock(&inst->lock);
   949  
   950          ret = venus_pm_acquire_core(inst);
   951          if (ret)
   952                  return ret;

goto error or just goto unlock?

   953  
   954          if (q->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
   955                  ret = vdec_start_capture(inst);
   956          else
   957                  ret = vdec_start_output(inst);
   958  
   959          if (ret)
   960                  goto error;
   961  
   962          mutex_unlock(&inst->lock);
   963          return 0;
   964  
   965  error:
   966          venus_helper_buffers_done(inst, VB2_BUF_STATE_QUEUED);
   967          mutex_unlock(&inst->lock);
   968          return ret;
   969  }

regards,
dan carpenter

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

* Re: [bug report] media: venus: introduce core selection
  2020-03-11  8:15 [bug report] media: venus: introduce core selection Dan Carpenter
@ 2020-03-11  8:57 ` Stanimir Varbanov
  0 siblings, 0 replies; 2+ messages in thread
From: Stanimir Varbanov @ 2020-03-11  8:57 UTC (permalink / raw)
  To: Dan Carpenter, amasule; +Cc: linux-media

Hi Dan,

Thanks! The fix is on its way already [1].

On 3/11/20 10:15 AM, Dan Carpenter wrote:
> Hello Aniket Masule,
> 
> The patch 4ebf969375bc: "media: venus: introduce core selection" from
> Dec 2, 2019, leads to the following static checker warning:
> 
> 	drivers/media/platform/qcom/venus/vdec.c:968 vdec_start_streaming()
> 	warn: inconsistent returns 'inst->lock'.
> 
> drivers/media/platform/qcom/venus/vdec.c
>    943  static int vdec_start_streaming(struct vb2_queue *q, unsigned int count)
>    944  {
>    945          struct venus_inst *inst = vb2_get_drv_priv(q);
>    946          int ret;
>    947  
>    948          mutex_lock(&inst->lock);
>    949  
>    950          ret = venus_pm_acquire_core(inst);
>    951          if (ret)
>    952                  return ret;
> 
> goto error or just goto unlock?
> 
>    953  
>    954          if (q->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
>    955                  ret = vdec_start_capture(inst);
>    956          else
>    957                  ret = vdec_start_output(inst);
>    958  
>    959          if (ret)
>    960                  goto error;
>    961  
>    962          mutex_unlock(&inst->lock);
>    963          return 0;
>    964  
>    965  error:
>    966          venus_helper_buffers_done(inst, VB2_BUF_STATE_QUEUED);
>    967          mutex_unlock(&inst->lock);
>    968          return ret;
>    969  }
> 
> regards,
> dan carpenter
> 

-- 
regards,
Stan

[1] https://www.spinics.net/lists/linux-media/msg164934.html

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

end of thread, other threads:[~2020-03-11  9:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11  8:15 [bug report] media: venus: introduce core selection Dan Carpenter
2020-03-11  8:57 ` Stanimir Varbanov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.