Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] drivers/media/video/tlg2300/pd-video.c: Remove second mutex_unlock in pd_vidioc_s_fmt

Error path in file drivers/media/video/tlg2300/pd-video.c:
1. First mutex_unlock on &pd->lock in line 767 (in function that
called from line 805)
2. Second in line 806

805 pd_vidioc_s_fmt(pd, &f->fmt.pix);
806 mutex_unlock(&pd->lock);

Found by Linux Device Drivers Verification Project

Signed-off-by: Alexander Strakh <strakh@ispras.ru>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Alexander Strakh and committed by
Mauro Carvalho Chehab
a07500ef 868e90d5

+1 -3
+1 -3
drivers/media/video/tlg2300/pd-video.c
··· 764 764 } 765 765 ret |= send_set_req(pd, VIDEO_ROSOLU_SEL, 766 766 vid_resol, &cmd_status); 767 - if (ret || cmd_status) { 768 - mutex_unlock(&pd->lock); 767 + if (ret || cmd_status) 769 768 return -EBUSY; 770 - } 771 769 772 770 pix_def->pixelformat = pix->pixelformat; /* save it */ 773 771 pix->height = (context->tvnormid & V4L2_STD_525_60) ? 480 : 576;