提交 b9e9cd32 编写于 作者: J Jiri Kosina

HID: pidff: effect can't be NULL

Force-beedback core guarantees that the 'effect' pointer that's being passed
to ->upload() callback is non-NULL.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 f1088b38
......@@ -569,7 +569,7 @@ static int pidff_upload_effect(struct input_dev *dev, struct ff_effect *effect,
int error;
pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 0;
if (old && effect) {
if (old) {
pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] =
pidff->pid_id[effect->id];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册