Skip to contentSkip to conversation

input: unlock on error paths

PATCH New Dan Carpenter 1 participant 1 message May 5, 2010

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

PATCH 1/1 input: unlock on error paths

We can't return here directly, we need to unlock the event_lock first. This was introduced in: edeada2cde "V4L/DVB: input: Add support for EVIO[CS]GKEYCODEBIG"

drivers/input/input.c +3 -2
index e623edf..7c3fc5e 100644
@@ -759,8 +759,9 @@ int input_set_keycode_big(struct input_dev *dev,
 		if (!dev->setkeycode)
 			goto out;
 
-		if (input_fetch_scancode(kt_entry, &scancode))
-			return -EINVAL;
+		retval = input_fetch_scancode(kt_entry, &scancode);
+		if (retval)
+			goto out;
 
 		retval = dev->getkeycode(dev, scancode,
 					 &old_keycode);