Skip to content

Commit

Permalink
[media] drivers/media/video/tlg2300/pd-video.c: Remove second mutex_u…
Browse files Browse the repository at this point in the history
…nlock 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>
  • Loading branch information
Alexander Strakh authored and Mauro Carvalho Chehab committed Mar 22, 2011
1 parent 868e90d commit a07500e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/media/video/tlg2300/pd-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a07500e

Please sign in to comment.