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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4b2ba24399
commit
7a02f549fc
@@ -795,10 +795,8 @@ int medusa_video_init(struct cx25821_dev *dev)
|
|||||||
value &= 0xFFFFFFDF;
|
value &= 0xFFFFFFDF;
|
||||||
ret_val = cx25821_i2c_write(&dev->i2c_bus[0], MON_A_CTRL, value);
|
ret_val = cx25821_i2c_write(&dev->i2c_bus[0], MON_A_CTRL, value);
|
||||||
|
|
||||||
if (ret_val < 0) {
|
if (ret_val < 0)
|
||||||
mutex_unlock(&dev->lock);
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
|
||||||
|
|
||||||
mutex_unlock(&dev->lock);
|
mutex_unlock(&dev->lock);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user