Commit dec3eb01 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: force feedback - make sure effect is present before playing

Make sure that requested effect id is not out of range for the
device and that effect is present before requesting device to
play it.
Reported-by: default avatarJan Kratochvil <honza@jikos.cz>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 84767d00
...@@ -281,6 +281,7 @@ int input_ff_event(struct input_dev *dev, unsigned int type, ...@@ -281,6 +281,7 @@ int input_ff_event(struct input_dev *dev, unsigned int type,
break; break;
default: default:
if (check_effect_access(ff, code, NULL) == 0)
ff->playback(dev, code, value); ff->playback(dev, code, value);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment