Skip to contentSkip to conversation

cx25821: fix double unlock in medusa_video_init()

PATCH New Dan Carpenter 1 participant 1 message Dec 28, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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. :/

drivers/staging/cx25821/cx25821-medusa-video.c +1 -3
@@ -860,10 +860,8 @@ int medusa_video_init(struct cx25821_dev
 
 	ret_val = medusa_set_videostandard(dev);
 
-	if (ret_val < 0) {
-		mutex_unlock(&dev->lock);
+	if (ret_val < 0)
 		return -EINVAL;
-	}
 
 	return 1;
 }