Skip to content

Commit

Permalink
V4L/DVB (13955): cx25821: fix double unlock in medusa_video_init()
Browse files Browse the repository at this point in the history
medusa_set_videostandard() takes the lock but it always drops it before
returning.

This was found with a static checker and compile tested only.  :/

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Jan 17, 2010
1 parent c424050 commit 423f5c0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/cx25821/cx25821-medusa-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,10 +860,8 @@ int medusa_video_init(struct cx25821_dev *dev)

ret_val = medusa_set_videostandard(dev);

if (ret_val < 0) {
mutex_unlock(&dev->lock);
if (ret_val < 0)
return -EINVAL;
}

return 1;
}

0 comments on commit 423f5c0

Please sign in to comment.