mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
Input: allocate absinfo data when setting ABS capability
commit 28a2a2e1ae upstream.
We need to make sure we allocate absinfo data when we are setting one of
EV_ABS/ABS_XXX capabilities, otherwise we may bomb when we try to emit this
event.
Rested-by: Paul Cercueil <pcercuei@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c074c8f4a7
commit
2d8ccbd72d
@@ -1866,6 +1866,10 @@ void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int
|
||||
break;
|
||||
|
||||
case EV_ABS:
|
||||
input_alloc_absinfo(dev);
|
||||
if (!dev->absinfo)
|
||||
return;
|
||||
|
||||
__set_bit(code, dev->absbit);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user