提交 abf9dc0d 编写于 作者: D Dan Carpenter 提交者: Darren Hart

thinkpad_acpi: signedness bugs getting current_mode

This needs to be signed for the error handling to work.  Valid modes are
small positive integers.

Fixes: b790ceeb ('thinkpad_acpi: Add adaptive_kbd_mode sysfs attr')
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-By: NBastien Nocera <hadess@hadess.net>
Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
上级 b4dd04ac
......@@ -2938,7 +2938,7 @@ static ssize_t adaptive_kbd_mode_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
u32 current_mode;
int current_mode;
current_mode = adaptive_keyboard_get_mode();
if (current_mode < 0)
......@@ -3621,7 +3621,7 @@ static int adaptive_keyboard_get_next_mode(int mode)
static bool adaptive_keyboard_hotkey_notify_hotkey(unsigned int scancode)
{
u32 current_mode = 0;
int current_mode = 0;
int new_mode = 0;
int keycode;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册