提交 dec3eb01 编写于 作者: D 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: NJan Kratochvil <honza@jikos.cz>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 84767d00
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册