Skip to contentSkip to conversation

Input: kxtj9: fix locking typo in kxtj9_set_poll()

PATCH Applied Dan Carpenter 2 participants 2 messages Jul 20, 2011

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

PATCH 2/2 Input: kxtj9: fix locking typo in kxtj9_set_poll()

According to the comments we want to call mutex_lock() here instead of mutex_unlock(). That makes more sense.

drivers/input/misc/kxtj9.c +1 -1
index 6c96dc3..c456f63 100644
@@ -362,7 +362,7 @@ static ssize_t kxtj9_set_poll(struct device *dev, struct device_attribute *attr,
 		return error;
 
 	/* Lock the device to prevent races with open/close (and itself) */
-	mutex_unlock(&input_dev->mutex);
+	mutex_lock(&input_dev->mutex);
 
 	disable_irq(client->irq);
 
maintainer Applied
#1 lore raw
Quoted 3 lines · Dan Carpenter

According to the comments we want to call mutex_lock() here instead of mutex_unlock(). That makes more sense.

Applied both, thanks Dan.

Signature · 1 line
Dmitry