check u32 < 0 in char/keyboard.c
Subsystems (2)
PATCH 1/1 check u32 < 0 in char/keyboard.c
hi,
another comparison of an unsigned value with < 0 since keycode is always unsigned int in the calling functions i just removed the check.
Signed-off-by Eric Sesterhenn <[email protected]>
drivers/char/keyboard.c renamed from drivers/char/keyboard.c.orig +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 ;
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors