Skip to contentSkip to conversation

tty: Fix LED error return

PATCH New Alan Cox 1 participant 1 message May 14, 2012 TTY layer and serial drivers

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 tty: Fix LED error return

From: Alan Cox <[email protected]>

3.4-rc introduced a regression when setting the LEDS. We do the right thing but then return an error code.

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=43144

Reported-by Christian Casteyde

---

 drivers/tty/vt/keyboard.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/tty/vt/keyboard.c +1 -1
index 86dd1e3..9f5c462 100644
@@ -2032,7 +2032,7 @@ int vt_do_kdskled(int console, int cmd, unsigned long arg, int perm)
 		kbd->default_ledflagstate = ((arg >> 4) & 7);
 		set_leds();
                 spin_unlock_irqrestore(&kbd_event_lock, flags);
-		break;
+		return 0;
 
 	/* the ioctls below only set the lights, not the functions */
 	/* for those, see KDGKBLED and KDSKBLED above */