Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a02f549 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4b2ba243
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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);