Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28a2a2e1 authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

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: default avatarPaul Cercueil <pcercuei@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 2a4d8154
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;