From: Dmitry Torokhov Date: Fri, 27 Dec 2013 01:44:29 +0000 (-0800) Subject: Input: allocate absinfo data when setting ABS capability X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=28a2a2e1aedbe2d8b2301e6e0e4e63f6e4177aca;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/input.c b/drivers/input/input.c index 846ccdd905b1..d2965e4b3224 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -1871,6 +1871,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;