diff options
author | Alexander Strakh <cromlehg@gmail.com> | 2011-01-25 18:00:13 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-14 13:02:38 -0700 |
commit | 4a349aa0c074ad2c46a6d2a1d3500da7ae300c4d (patch) | |
tree | 885d153ceb6870a0b91ba16687c68339d3aae24d | |
parent | 42f9f8d3b8952cff082276a7e3f21e071113384e (diff) | |
download | lwn-4a349aa0c074ad2c46a6d2a1d3500da7ae300c4d.tar.gz lwn-4a349aa0c074ad2c46a6d2a1d3500da7ae300c4d.zip |
drivers/media/video/tlg2300/pd-video.c: Remove second mutex_unlock in pd_vidioc_s_fmt
commit a07500ef690fcbec76e879ee2093d7ca69883825 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/media/video/tlg2300/pd-video.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/video/tlg2300/pd-video.c b/drivers/media/video/tlg2300/pd-video.c index df33a1d188bb..a794ae62aebf 100644 --- a/drivers/media/video/tlg2300/pd-video.c +++ b/drivers/media/video/tlg2300/pd-video.c @@ -764,10 +764,8 @@ static int pd_vidioc_s_fmt(struct poseidon *pd, struct v4l2_pix_format *pix) } ret |= send_set_req(pd, VIDEO_ROSOLU_SEL, vid_resol, &cmd_status); - if (ret || cmd_status) { - mutex_unlock(&pd->lock); + if (ret || cmd_status) return -EBUSY; - } pix_def->pixelformat = pix->pixelformat; /* save it */ pix->height = (context->tvnormid & V4L2_STD_525_60) ? 480 : 576; |