Skip to content

Commit

Permalink
Input: allocate absinfo data when setting ABS capability
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
dtor committed Dec 31, 2013
1 parent 2a4d815 commit 28a2a2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 28a2a2e

Please sign in to comment.