diff options
author | Dan Carpenter <error27@gmail.com> | 2009-12-28 18:59:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 16:42:38 -0800 |
commit | 7a02f549fcc30fe6be0c0024beae9a3db22e1af6 (patch) | |
tree | db3723ace0932bef9ac0851a61f0b76b177e5b4a /drivers/staging/cx25821 | |
parent | 4b2ba24399cfcd7c80a20cd3bbedc5df0ebd4345 (diff) |
Staging: cx25821: fix double unlock in medusa_video_init()
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: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/cx25821')
-rw-r--r-- | drivers/staging/cx25821/cx25821-medusa-video.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/cx25821/cx25821-medusa-video.c b/drivers/staging/cx25821/cx25821-medusa-video.c index 1eb079b3d42..d6016200d69 100644 --- a/drivers/staging/cx25821/cx25821-medusa-video.c +++ b/drivers/staging/cx25821/cx25821-medusa-video.c @@ -795,10 +795,8 @@ int medusa_video_init(struct cx25821_dev *dev) value &= 0xFFFFFFDF; ret_val = cx25821_i2c_write(&dev->i2c_bus[0], MON_A_CTRL, value); - if (ret_val < 0) { - mutex_unlock(&dev->lock); + if (ret_val < 0) return -EINVAL; - } mutex_unlock(&dev->lock); |