drivers/char/keyboard.c unsigned comparison
PATCH RESEND 1/1 drivers/char/keyboard.c unsigned comparison
keycode is a checked for a value less than zero, but is defined as an unsigned int, and is only called in one place in the kernel, and passed a unsigned int, so this comparison is bogus.
Thanks to LinuxICC (http://linuxicc.sf.net)
This patch applies to Linus' git tree as of 12.11.2005
Signed-off-by Gabriel A. Devenyi <[email protected]>
drivers/char/keyboard.c +1 -1
@@ -198,7 +198,7 @@ int setkeycode(unsigned int scancode, unif (scancode >= dev->keycodemax)return -EINVAL ; -if (keycode <0 || keycode >KEY_MAX ) +if (keycode >KEY_MAX )return -EINVAL ;if (dev->keycodesize <sizeof (keycode) && (keycode >> (dev->keycodesize *8 )))return -EINVAL ;
Signature · 2 lines
Gabriel A. Devenyi [email protected]