Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dec3eb01c2409ca8276c1152c167add66a37d1ba Commit: dec3eb01c2409ca8276c1152c167add66a37d1ba Parent: 84767d00a8fd54dd97866561f6e2ee246c8e1cdc Author: Dmitry Torokhov <[EMAIL PROTECTED]> AuthorDate: Thu May 3 00:51:10 2007 -0400 Committer: Dmitry Torokhov <[EMAIL PROTECTED]> CommitDate: Thu May 3 00:51:10 2007 -0400
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 <[EMAIL PROTECTED]> Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]> --- 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 783b341..eebc724 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; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html