diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2018-06-04 07:22:28 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-06-05 09:50:48 -0400 |
commit | 5983d3bca5282b6785473434894933fa908ef693 (patch) | |
tree | 7123fe5e6fcb1306b1f839c1da5475c3937af56d | |
parent | 8cbc3a856fc6acee31f9820a566a9625776b68ee (diff) |
media: v4l2-ioctl.c: fix missing unlock in __video_do_ioctl()
If dev_debug was active, then the code could return without unlocking the
core mutex. Replace the return with a 'goto unlock' to ensure proper unlocking.
Fixes: 73a110623e7b ("v4l2-core: push taking ioctl mutex down to ioctl handler")
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r-- | drivers/media/v4l2-core/v4l2-ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 965fd301f617..dd210067151f 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c | |||
@@ -2777,7 +2777,7 @@ done: | |||
2777 | if (dev_debug & (V4L2_DEV_DEBUG_IOCTL | V4L2_DEV_DEBUG_IOCTL_ARG)) { | 2777 | if (dev_debug & (V4L2_DEV_DEBUG_IOCTL | V4L2_DEV_DEBUG_IOCTL_ARG)) { |
2778 | if (!(dev_debug & V4L2_DEV_DEBUG_STREAMING) && | 2778 | if (!(dev_debug & V4L2_DEV_DEBUG_STREAMING) && |
2779 | (cmd == VIDIOC_QBUF || cmd == VIDIOC_DQBUF)) | 2779 | (cmd == VIDIOC_QBUF || cmd == VIDIOC_DQBUF)) |
2780 | return ret; | 2780 | goto unlock; |
2781 | 2781 | ||
2782 | v4l_printk_ioctl(video_device_node_name(vfd), cmd); | 2782 | v4l_printk_ioctl(video_device_node_name(vfd), cmd); |
2783 | if (ret < 0) | 2783 | if (ret < 0) |