Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: allocate absinfo data when setting ABS capability

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>

+4
+4
drivers/input/input.c
··· 1871 1871 break; 1872 1872 1873 1873 case EV_ABS: 1874 + input_alloc_absinfo(dev); 1875 + if (!dev->absinfo) 1876 + return; 1877 + 1874 1878 __set_bit(code, dev->absbit); 1875 1879 break; 1876 1880