From 26021cf9139755640ddcd97bb286e5f5ee8efacf Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Thu, 26 Dec 2013 17:44:29 -0800 Subject: Input: allocate absinfo data when setting ABS capability commit 28a2a2e1aedbe2d8b2301e6e0e4e63f6e4177aca 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 Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/input/input.c b/drivers/input/input.c index e75d015..74f4798 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; -- cgit v0.10.2