diff mbox

[-next] input: unlock on error paths

Message ID 20100505055624.GB27064@bicker (mailing list archive)
State Accepted
Headers show

Commit Message

Dan Carpenter May 5, 2010, 5:56 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/input/input.c b/drivers/input/input.c
index e623edf..7c3fc5e 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -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);