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>

authored by Olaf Kirch and committed by Linus Torvalds d791d413 b1847a04

-2
-2
drivers/media/dvb/dvb-usb/dvb-usb-remote.c
··· 107 return -ENOMEM; 108 109 input_dev->evbit[0] = BIT(EV_KEY); 110 - input_dev->keycodesize = sizeof(unsigned char); 111 - input_dev->keycodemax = KEY_MAX; 112 input_dev->name = "IR-receiver inside an USB DVB receiver"; 113 input_dev->phys = d->rc_phys; 114 usb_to_input_id(d->udev, &input_dev->id);
··· 107 return -ENOMEM; 108 109 input_dev->evbit[0] = BIT(EV_KEY); 110 input_dev->name = "IR-receiver inside an USB DVB receiver"; 111 input_dev->phys = d->rc_phys; 112 usb_to_input_id(d->udev, &input_dev->id);