summaryrefslogtreecommitdiff
path: root/drivers/input/input.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2013-12-26 17:44:29 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-12-31 10:53:19 -0800
commit28a2a2e1aedbe2d8b2301e6e0e4e63f6e4177aca (patch)
tree7d1a45c313cecc0c9cb72ad7aae24271fde9d6ba /drivers/input/input.c
parent2a4d81547b88b4ff566d4b4f9c0e36285ed07634 (diff)
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>
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c4
1 files changed, 4 insertions, 0 deletions
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;