Commit 45ec9b9a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] vt_ioctl warning fixes

Several comparisons which can never be true because they're comparing u8's
with numbers which are greater than 255.
parent 9dbe10bd
...@@ -82,8 +82,6 @@ do_kdsk_ioctl(int cmd, struct kbentry *user_kbe, int perm, struct kbd_struct *kb ...@@ -82,8 +82,6 @@ do_kdsk_ioctl(int cmd, struct kbentry *user_kbe, int perm, struct kbd_struct *kb
if (copy_from_user(&tmp, user_kbe, sizeof(struct kbentry))) if (copy_from_user(&tmp, user_kbe, sizeof(struct kbentry)))
return -EFAULT; return -EFAULT;
if (i >= NR_KEYS || s >= MAX_NR_KEYMAPS)
return -EINVAL;
switch (cmd) { switch (cmd) {
case KDGKBENT: case KDGKBENT:
...@@ -208,10 +206,6 @@ do_kdgkb_ioctl(int cmd, struct kbsentry *user_kdgkb, int perm) ...@@ -208,10 +206,6 @@ do_kdgkb_ioctl(int cmd, struct kbsentry *user_kdgkb, int perm)
goto reterr; goto reterr;
} }
kbs->kb_string[sizeof(kbs->kb_string)-1] = '\0'; kbs->kb_string[sizeof(kbs->kb_string)-1] = '\0';
if (kbs->kb_func >= MAX_NR_FUNC) {
ret = -EINVAL;
goto reterr;
}
i = kbs->kb_func; i = kbs->kb_func;
switch (cmd) { switch (cmd) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment