summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2013-12-27 05:44:29 +0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-12-31 22:53:19 +0400
commit28a2a2e1aedbe2d8b2301e6e0e4e63f6e4177aca (patch)
tree7d1a45c313cecc0c9cb72ad7aae24271fde9d6ba /drivers/input
parent2a4d81547b88b4ff566d4b4f9c0e36285ed07634 (diff)
downloadlinux-28a2a2e1aedbe2d8b2301e6e0e4e63f6e4177aca.tar.xz
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')
-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;