Commit d791d413fd8527aa6b130882cc84d52aee0fe980
Committed by
Linus Torvalds
1 parent
b1847a041a
Exists in
master
and in
7 other branches
DVB: dvb-usb-remote - fix oops when changing keymap
DVB USB remotes do not support changing keycode maps but set input_dev->keycodesize and input_dev->keycodemax without setting input_dev->keycode. This causes kernel oops when user tries to look up (or change) current keymap. While the proper fix would be to make remotes handle keymap changes we'll just remove keycodemax and keycodesize initialization so EVIOCGKEYCODE and EVIOCSKEYCODE will simply return -EINVAL. http://bugzilla.kernel.org/show_bug.cgi?id=8312 Signed-off-by: olaf.kirch@oracle.com Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 0 additions and 2 deletions Side-by-side Diff
drivers/media/dvb/dvb-usb/dvb-usb-remote.c
... | ... | @@ -107,8 +107,6 @@ |
107 | 107 | return -ENOMEM; |
108 | 108 | |
109 | 109 | input_dev->evbit[0] = BIT(EV_KEY); |
110 | - input_dev->keycodesize = sizeof(unsigned char); | |
111 | - input_dev->keycodemax = KEY_MAX; | |
112 | 110 | input_dev->name = "IR-receiver inside an USB DVB receiver"; |
113 | 111 | input_dev->phys = d->rc_phys; |
114 | 112 | usb_to_input_id(d->udev, &input_dev->id); |