summaryrefslogtreecommitdiffstats
path: root/drivers/input/input.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2013-12-27 02:44:29 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-12-31 19:53:19 +0100
commit28a2a2e1aedbe2d8b2301e6e0e4e63f6e4177aca (patch)
tree7d1a45c313cecc0c9cb72ad7aae24271fde9d6ba /drivers/input/input.c
parentInput: define KEY_WWAN for Wireless WAN (diff)
downloadlinux-28a2a2e1aedbe2d8b2301e6e0e4e63f6e4177aca.tar.xz
linux-28a2a2e1aedbe2d8b2301e6e0e4e63f6e4177aca.zip
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 '')
-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;