From 5983d3bca5282b6785473434894933fa908ef693 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 4 Jun 2018 07:22:28 -0400 Subject: [PATCH] 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 965fd30..dd21006 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -2777,7 +2777,7 @@ done: if (dev_debug & (V4L2_DEV_DEBUG_IOCTL | V4L2_DEV_DEBUG_IOCTL_ARG)) { if (!(dev_debug & V4L2_DEV_DEBUG_STREAMING) && (cmd == VIDIOC_QBUF || cmd == VIDIOC_DQBUF)) - return ret; + goto unlock; v4l_printk_ioctl(video_device_node_name(vfd), cmd); if (ret < 0) -- 2.7.4