diff options
author | 2007-05-03 00:51:10 -0400 | |
---|---|---|
committer | 2007-05-03 00:51:10 -0400 | |
commit | dec3eb01c2409ca8276c1152c167add66a37d1ba (patch) | |
tree | 4c73362335ec1a82531a06af70f8d140bf44c5dc /drivers/input | |
parent | Input: gpio_keys - add support for switches (EV_SW) (diff) | |
download | linux-dec3eb01c2409ca8276c1152c167add66a37d1ba.tar.gz linux-dec3eb01c2409ca8276c1152c167add66a37d1ba.tar.bz2 linux-dec3eb01c2409ca8276c1152c167add66a37d1ba.zip |
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: Jan Kratochvil <honza@jikos.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/ff-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/ff-core.c b/drivers/input/ff-core.c index 783b3412cead..eebc72465fc9 100644 --- a/drivers/input/ff-core.c +++ b/drivers/input/ff-core.c @@ -281,7 +281,8 @@ int input_ff_event(struct input_dev *dev, unsigned int type, break; default: - ff->playback(dev, code, value); + if (check_effect_access(ff, code, NULL) == 0) + ff->playback(dev, code, value); break; } |