提交 95349fe8 编写于 作者: D Dmitry Torokhov

Input: libps2 - warn instead of oopsing when passed bad arguments

This is more user-friendly and also fixes Coverity #id 249
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 69975619
......@@ -177,6 +177,11 @@ int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command)
return -1;
}
if (send && !param) {
WARN_ON(1);
return -1;
}
mutex_lock_nested(&ps2dev->cmd_mutex, SINGLE_DEPTH_NESTING);
serio_pause_rx(ps2dev->serio);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册