Commit f81e372a authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] stk-webcam: s_fmt shouldn't grab ownership

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Tested-by: default avatarArvydas Sidorenko <asido4@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1b499fe5
...@@ -1019,12 +1019,11 @@ static int stk_vidioc_s_fmt_vid_cap(struct file *filp, ...@@ -1019,12 +1019,11 @@ static int stk_vidioc_s_fmt_vid_cap(struct file *filp,
return -ENODEV; return -ENODEV;
if (is_streaming(dev)) if (is_streaming(dev))
return -EBUSY; return -EBUSY;
if (dev->owner && dev->owner != filp) if (dev->owner)
return -EBUSY; return -EBUSY;
ret = stk_try_fmt_vid_cap(filp, fmtd, &idx); ret = stk_try_fmt_vid_cap(filp, fmtd, &idx);
if (ret) if (ret)
return ret; return ret;
dev->owner = filp;
dev->vsettings.palette = fmtd->fmt.pix.pixelformat; dev->vsettings.palette = fmtd->fmt.pix.pixelformat;
stk_free_buffers(dev); stk_free_buffers(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment