projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84767d0
)
Input: force feedback - make sure effect is present before playing
author
Dmitry Torokhov
<dtor@insightbb.com>
Thu, 3 May 2007 04:51:10 +0000
(
00:51
-0400)
committer
Dmitry Torokhov
<dtor@insightbb.com>
Thu, 3 May 2007 04:51:10 +0000
(
00:51
-0400)
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>
drivers/input/ff-core.c
patch
|
blob
|
history
diff --git
a/drivers/input/ff-core.c
b/drivers/input/ff-core.c
index 783b3412ceadad32b77430c483ce3375faafc481..eebc72465fc9beb44d2ecfa77a78d24cbd31f891 100644
(file)
--- 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;
}